![]() |
#526 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,984
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
@Jade Aislin - Yes, it's the {#character1:subitems(-1,0)} composite column. Using that, I'm able to duplicate the problem.
A composite of {#characters}, {#genre} still worked, however, so it has to do with the subitems function call. So this is either a problem of "you're not using it right", or calibre not interpreting the subitems template function in the composite column right away. If you believe it's the latter, you'll need to take it up with the calibre devs. I can help demonstrate the problem, if needed. |
![]() |
![]() |
#527 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,984
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Or you might take it up with kiwidude in the GC forum--he may have more insight.
|
![]() |
![]() |
#528 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,984
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
@Jade Aislin - I think I have a work around for the GC issue with complex custom columns.
Please try the attached version and see if works better for you. Last edited by JimmXinu; 07-08-2012 at 11:06 PM. Reason: Remove obsolete beta versions |
![]() |
![]() |
#529 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,449
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
If I understand the last couple of posts correctly, in some cases a composite column appears to have delayed evaluation. I interpret this as saying that at point A the value is wrong, where later it becomes correct. This behavior can happen if point A is when new books are added but before calibre's data cache is refreshed, and point B is after the cache is refreshed. The cache for a changed book tends to be refreshed when the calibre GUI displays the line for that book. It can also be explicitly refreshed. Because of this characteristic, if a plugin does the sequence: 1) add a book. 2) add metadata to the book. 3) mi = get_metadata() 4) do something with the mi structure then the composite columns in the mi will not have the correct values. Why? It gets the values from the data cache, and the data cache is not yet up-to-date. The same thing will be true if 1) and 2) are instead "change metadata". If the plugin is doing the above or something like it, then between steps 2 and 3 (I think) it should do "db.refresh_ids([list of book ids])", where "db" is the database object that you should already have. The list of IDs should contain all the ids that you will pass to get_metadata. |
|
![]() |
![]() |
#530 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,449
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
# force a refresh if generating cover so complex composite # custom columns are current and correct self.gui.library_view.model().refresh_ids([book_id]) Note that the stale data problem can affect other fields as well. Get_metadata reads most of the standard fields from the cache, such as series, publisher, dates. After metadata updates, these will be stale until a db.refresh_ids is done. |
|
![]() |
![]() |
#531 | ||
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,984
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
![]() Quote:
Code:
self.gui.library_view.model().refresh_ids([book_id]) But it would have been a lot easier to find if the behavior were consistent, either one way or the other. A simple custom column and a composite column with a simple template ("{#characters}, {#genre}"): both work without the refresh. But a composite column with a template function ("{#genre:uppercase()}") doesn't work without the refresh. |
||
![]() |
![]() |
#532 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,984
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
|
|
![]() |
![]() |
#533 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,449
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Yes, it is the solution.
Quote:
And using the cache would make the behavior consistent. ![]() |
|
![]() |
![]() |
#534 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,984
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Version 1.5.43 - 08 Jul 2012
New Site: dark-solace.org New Site: pretendercentre.com New Site: themasque.net Fixes for a couple obscure problems with calling Generate Cover. |
![]() |
![]() |
#535 |
Member
![]() Posts: 20
Karma: 10
Join Date: Nov 2011
Location: Scotland
Device: Amazon Kindle 3 Keyboard
|
I can't say thank you enough for everyone who works on that plugin and makes it work.
I came across an interesting thing. There is one story on ksarchive.com what can't be downloaded. Maybe someone wants to try and will see the error as I do. Link is: http://www.ksarchive.com/viewstory.p...4065&warning=1 The message I get can be seen in attached picture. |
![]() |
![]() |
#536 | |
Occassional Beta Tester
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 284
Karma: 3516
Join Date: Nov 2010
Location: Hungary
Device: none
|
Quote:
I have an account, but even after I put my name and password into personal.ini, I got the same error. |
|
![]() |
![]() |
#537 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 164
Karma: 3100
Join Date: Sep 2011
Device: Kobo Auro H2O, PRS-T1
|
That seems to have fixed the problem with the composite column.
Thanks. |
![]() |
![]() |
#538 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,984
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
Code:
<a href="browse.php?type=categories&catid=1"></a> Attached version updated for tweak to 'get urls from page' feature. Attached version with another ksa fix for poor summary html. Attached version with fix for wraithbait story with blockquote tags. Attached version with fix for August dates on dramione.org. Last edited by JimmXinu; 07-13-2012 at 04:58 PM. Reason: Remove obsolete beta versions |
|
![]() |
![]() |
#539 |
Member
![]() Posts: 20
Karma: 10
Join Date: Nov 2011
Location: Scotland
Device: Amazon Kindle 3 Keyboard
|
Great, it works perfectly.
|
![]() |
![]() |
#540 |
Member
![]() Posts: 20
Karma: 10
Join Date: Nov 2011
Location: Scotland
Device: Amazon Kindle 3 Keyboard
|
And here comes something new. Again a story what can't be read.
I don't know if that is caused by the same thing. http://www.ksarchive.com/viewstory.php?sid=4124 See again attachment. |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Resize Cover | kiwidude | Plugins | 100 | 07-10-2025 08:50 AM |
[GUI Plugin] Count Pages | kiwidude | Plugins | 1844 | 05-25-2025 11:24 AM |
[GUI Plugin] Find Duplicates | kiwidude | Plugins | 1124 | 04-18-2025 09:19 AM |
[GUI Plugin] Open With | kiwidude | Plugins | 404 | 02-21-2025 05:42 AM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |