View Single Post
Old 12-31-2020, 08:09 AM   #230
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,197
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
I will look at this and try to handle it more gracefully. But I suggest you set the following condition on the chain to disable it for books that do not have the appropriate format:

Code:
template:
program: if selection_count() == 1 then str_in_list(approximate_formats(), ',', 'EPUB', 'true', 0) fi
datatype: text comparison: = Condition value = true icon = epub.png tooltip = Single book with an epub format
Replace EPUB with whatever format you want, but in capitalized letters. And maybe find a nice epub icon to use it as the condition icon.

Edit1: Modified template to add another test for selection count.
Edit2: Remove redundant if statement.

Last edited by capink; 01-19-2021 at 10:37 AM. Reason: simplify template
capink is offline   Reply With Quote