View Single Post
Old 08-16-2023, 08:42 PM   #5
imnnrv
Member
imnnrv began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Aug 2023
Device: none
Quote:
Originally Posted by chaley View Post
Ignore that message, and also the one that follows saying that no fields are in the template. Both of these are historical artifacts that I haven't bothered to try to fix.
Thank you for you help!

It almost works, except it doesn't count some of authors/books: it think there is less than X books of this authors even if there are 10 and more books.
I've tried to rename them, move these books to new library - all the same (so it doesn't depends on library size). Tried to make X=1 and even then there was 1 author (3 books) counted as <1.
Made test with plugin "Author Book Count': it counts right, so i don't think it's problem with tags.

Can you please check the code for mistakes?

program:
first_author = list_item($authors, 0, '&');
books_by_author = book_count('authors:"""=' & first_author & '"""', 0);
X = 2;
if books_by_author < X then
answer = template('Fiction/{languages}/{author_sort} - {pubdate} - {title}')
else
answer = template('Fiction/{languages}/{author_sort:sublist(0,1,&)}/{series}/{series:|| }{series_index:|| - }{pubdate} - {title}')
fi;
answer
imnnrv is offline   Reply With Quote