![]() |
#1 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,970
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
How to recalc a virtual_libraries() column?
I run into an rare glitch where my virtual_libraries() template starts reporting 'recursion detected' when there actually isn't any -- I can't reliably replicate it yet, but I noticed it sometimes happens after I run an action chain that modifies several columns in sequence (maybe the template processor is confused by the values rapidly changing?)
Restarting Calibre fixes the issue, but is there another way to re-calculate the column? Last edited by ownedbycats; 04-02-2022 at 05:02 PM. |
![]() |
![]() |
![]() |
#2 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,444
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
NB: IIRC "Recursion detected" can happen if a saved search references a VL that references a saved search, either directly or through a composite column. The problem is that the second search cannot depend on the results of the first because it hasn't finished yet. I know how to fix it, build a Directed Acyclical Graph (DAG) of the operations, but this is both hard and slow to compute. |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,970
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Thanks.
Is there any obvious recursion going on here? Virtual library: Code:
search:"=Books Currently Reading" OR #readinglist:"~To Be Read" Code:
template:"program: readstatus()#@#:t:currentlyreading" Code:
program: if $$#percentread >=#1 && $$#percentread <=#99 then 'currentlyreading' elif "To Be Read" in $#readinglist && $$#percentread ==#0 then 'toberead' elif $$#percentread >=#100 then 'read' elif $$#percentread == 'None' then 'undefined' elif $$#percentread >=# 0 then 'unread' fi I'll try changing the VL to query readstatus() directly and skip the saved search: Code:
template:"program: if '(currentlyreading|toberead)' in readstatus() then 'yes' fi#@#:t:yes" Last edited by ownedbycats; 04-02-2022 at 06:44 PM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Function virtual_libraries() | Divingduck | Library Management | 12 | 08-06-2017 11:28 AM |
Move selected data from series column to a new custom column | fvdham | Library Management | 3 | 06-02-2017 03:49 PM |
Single column ePUB becomes 2 column when converted to Kindle (mobi) | rmcape | Conversion | 0 | 09-21-2013 12:52 PM |
Using "Build column from other column" custom-column type | HFC3 | Library Management | 3 | 07-07-2013 03:11 AM |
Q: multi-column PDF to single column mobi format converstion | auburn1975 | Calibre | 7 | 01-28-2012 06:11 PM |