View Single Post
Old 04-02-2022, 06:19 PM   #3
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,050
Karma: 75568269
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"
Saved search "Books Currently Reading":

Code:
template:"program: readstatus()#@#:t:currentlyreading"
readstatus():

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
#readinglist is a series-like and #percentread is integer.



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.
ownedbycats is offline   Reply With Quote