DobyTang / LazyLibrarian

This project isn't finished yet. Goal is to create a SickBeard, CouchPotato, Headphones-like application for ebooks. Headphones is used as a base, so there are still a lot of references to it.
728 stars 72 forks source link

Author updates adding more books than expected to Wanted #1535

Closed wizzy99 closed 6 years ago

wizzy99 commented 6 years ago

To help with identifying and fixing issues, please include as much information as possible, including:

LazyLibrarian version number (at the bottom of config page)

9bdc7a4c844ab7eaaeb3f17fb3faa788254334da

Operating system used (windows, mac, linux, NAS type)

fedora fc28

Interface in use (default, bookstrap)

bookstrap

Which api (Goodreads, GoogleBooks, both)

I'm noticing that when author updates run, I'm getting more books than expected added to the wanted list. A screen shot of my processing config is here https://imgur.com/a/UIB59bK

Author 1: Before: No books by given author on Manage screen Update runs: Book processing complete: Added 4 books / Updated 19 books After: 22 books show up on Manage list as wanted

Author 2: Before: No books by given author on Manage screen Update runs: Book processing complete: Added 16 books / Updated 62 books After: 58 books show up on Manage list

I've just enabled debug so will report back as I have more info

philborman commented 6 years ago

Regular debug log should be enough. Look for lines "[author name] Added book: book title [lang] status xxxx" "[author name] Updated book: book title [lang] status xxxx"

The "Added book" lines should show status "Wanted" as you have new book status "Wanted" but the "Updated book" lines are a bit more complicated... They should keep their existing status, except...

  1. books marked "Have" get changed to "Open" if there is a bookfile available
  2. books not marked "Have" or "Open", we check series and author... if book is part of a series marked wanted, mark book as wanted else if book is part of a series marked skipped, mark book as skipped else if author is wanted, mark book as wanted else if author is paused or ignored, mark book as skipped
wizzy99 commented 6 years ago

Looks like you fixed it already, but here's the debug log; it added several books as wanted.

lazylibrarian.log:08-Aug-2018 15:28:26 - INFO :: AUTHORUPDATE : common.py:authorUpdate:572 : Starting update for Amanda Foreman lazylibrarian.log:08-Aug-2018 15:28:26 - DEBUG :: AUTHORUPDATE : importer.py:addAuthorToDB:149 : Updating author Amanda Foreman lazylibrarian.log:08-Aug-2018 15:28:27 - DEBUG :: AUTHORUPDATE : gr.py:get_author_info:306 : [Amanda Foreman] Processing info for authorID: 183491 lazylibrarian.log:08-Aug-2018 15:28:28 - DEBUG :: AUTHORUPDATE : gr.py:get_author_books:404 : [Amanda Foreman] Now processing books with GoodReads API lazylibrarian.log:08-Aug-2018 15:28:28 - DEBUG :: AUTHORUPDATE : gr.py:get_author_books:409 : GoodReads author name [Amanda Foreman] lazylibrarian.log:08-Aug-2018 15:28:28 - DEBUG :: AUTHORUPDATE : gr.py:get_author_books:698 : Bookid 319300 for [Amanda Foreman][Georgiana] is in database marked Skipped lazylibrarian.log:08-Aug-2018 15:28:29 - DEBUG :: AUTHORUPDATE : gr.py:get_author_books:862 : [Amanda Foreman] Updated book: Georgiana [eng] status Wanted lazylibrarian.log:08-Aug-2018 15:28:29 - DEBUG :: AUTHORUPDATE : gr.py:get_author_books:698 : Bookid 8796854 for [Amanda Foreman][A World on Fire] is in database marked Open lazylibrarian.log:08-Aug-2018 15:28:30 - DEBUG :: AUTHORUPDATE : gr.py:get_author_books:862 : [Amanda Foreman] Updated book: A World on Fire [eng] status Open lazylibrarian.log:08-Aug-2018 15:28:30 - DEBUG :: AUTHORUPDATE : gr.py:get_author_books:677 : Rejecting Madame de Pompadour for Amanda Foreman, Wrong Author (got Nancy Mitford,None) lazylibrarian.log:08-Aug-2018 15:28:30 - DEBUG :: AUTHORUPDATE : gr.py:get_author_books:677 : Rejecting Ann Veronica for Amanda Foreman, Wrong Author (got H.G. Wells,None) lazylibrarian.log:08-Aug-2018 15:28:30 - DEBUG :: AUTHORUPDATE : gr.py:get_author_books:677 : Rejecting Kristallnacht for Amanda Foreman, Wrong Author (got Martin Gilbert,None) lazylibrarian.log:08-Aug-2018 15:28:30 - DEBUG :: AUTHORUPDATE : gr.py:get_author_books:677 : Rejecting What Might Have Been for Amanda Foreman, Wrong Author (got Andrew Roberts,Editor) lazylibrarian.log:08-Aug-2018 15:28:30 - DEBUG :: AUTHORUPDATE : gr.py:get_author_books:687 : Renaming bookid 591407 for [Amanda Foreman][Untitled] to [Georgiana's World] lazylibrarian.log:08-Aug-2018 15:28:30 - DEBUG :: AUTHORUPDATE : gr.py:get_author_books:862 : [Amanda Foreman] Updated book: Georgiana's World [eng] status Wanted lazylibrarian.log:08-Aug-2018 15:28:31 - DEBUG :: AUTHORUPDATE : bookwork.py:isbn_from_words:939 : Found 1 ISBN13 for The World Made By Women: A History of Women From the Apple to the Pill Amanda Foreman lazylibrarian.log:08-Aug-2018 15:28:31 - DEBUG :: AUTHORUPDATE : gr.py:get_author_books:698 : Bookid 27797114 for [Amanda Foreman][The World Made By Women] is in database marked Skipped lazylibrarian.log:08-Aug-2018 15:28:32 - DEBUG :: AUTHORUPDATE : gr.py:get_author_books:862 : [Amanda Foreman] Updated book: The World Made By Women [eng] status Wanted lazylibrarian.log:08-Aug-2018 15:28:33 - DEBUG :: AUTHORUPDATE : bookwork.py:isbn_from_words:939 : Found 2 ISBN13 for The Amazon Women: Is There Any Truth Behind the Myth? Amanda Foreman lazylibrarian.log:08-Aug-2018 15:28:33 - DEBUG :: AUTHORUPDATE : gr.py:get_author_books:698 : Bookid 31180986 for [Amanda Foreman][The Amazon Women] is in database marked Skipped lazylibrarian.log:08-Aug-2018 15:28:33 - DEBUG :: AUTHORUPDATE : gr.py:get_author_books:862 : [Amanda Foreman] Updated book: The Amazon Women [eng] status Wanted lazylibrarian.log:08-Aug-2018 15:28:37 - DEBUG :: AUTHORUPDATE : images.py:getBookCover:287 : Caching goodreads cover for Amanda Foreman Georgiana Duchess of Devonshire lazylibrarian.log:08-Aug-2018 15:28:37 - DEBUG :: AUTHORUPDATE : gr.py:get_author_books:858 : [Amanda Foreman] Added book: Georgiana Duchess of Devonshire [eng] status Wanted lazylibrarian.log:08-Aug-2018 15:28:46 - INFO :: AUTHORUPDATE : gr.py:get_author_books:946 : [Amanda Foreman] Book processing complete: Added 1 book / Updated 5 books lazylibrarian.log:08-Aug-2018 15:28:46 - DEBUG :: AUTHORUPDATE : importer.py:update_totals:387 : Updated totals for [Amanda Foreman] lazylibrarian.log:08-Aug-2018 15:28:46 - INFO :: AUTHORUPDATE : importer.py:addAuthorToDB:337 : [Amanda Foreman] Author update complete, status Active

philborman commented 6 years ago

Hopefully fixed, there was a typo in the code that kept the existing book status, so could end up with existing books getting new book status. Let me know if it happens again with the latest version, it's only had a quick test.