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.
732 stars 70 forks source link

Unable to see/add books after latest update #689

Closed akhan23wgu closed 7 years ago

akhan23wgu commented 7 years ago

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

LazyLibrarian version number: Latest Version: 897f56c947ed7e3513d61c0e08ce733196b04e72 Operating system used: FreeBSD Interface: bookstrap & default Source of your LazyLibrarian installation: FreeNAS plugin, git updated Relevant debug log with api keys and any passwords redacted: lazylibrarian.pdf

After updating to the latest version of LazyLibrarian (DB 15 -> 16), all my "Books" have disappeared and only Magazines are visible. I am also unable to add new Books.

2017-03-12_11h42_52 2017-03-12_11h43_02

After performing library scan: 2017-03-12 11:54:53 INFO Library scan complete 2017-03-12 11:54:53 INFO 18 files processed 2017-03-12 11:54:53 INFO 0/0 new/modified books found and added to the database 2017-03-12 11:54:53 INFO Scanning ebook directory: /media/Books

philborman commented 7 years ago

Unusual. Can't immediately see why. Couple of options to get around it...

  1. we could investigate, might be a simple fix but would need some manual work at your end. You would need to be able to ssh into your freenas and use sqlite command line and/or python commands. I could guide you with what commands to run. FreeNas is linux based, so not too hard to do.
  2. You could delete your lazylibrarian.db and do a quick reinstall, shouldn't take long as most data will already be cached.

Would be good to know what went wrong if you're able, but if not a quick reinstall would be...

  1. Save all "wanted" books by exporting a csv wishlist from the "manage" page
  2. stop lazylibrarian
  3. delete lazylibrarian.db from the command line
  4. restart lazylibrarian
  5. Magazine page, Libraryscan
  6. Main authors page, Libraryscan
  7. Manage page, import csv wishlist
akhan23wgu commented 7 years ago

I did option 2 - still not working. Couldn't export my wanted books because nothing was there. It's strange that it sees the files, but doesn't display it in the web interface.

I'm pretty comfortable with linux/freebsd, and I am normally ssh'd in. What are the sqlite commands?

2017-03-12 13:09:46 INFO Active author update complete 2017-03-12 13:09:46 INFO Starting update for 0 active authors 2017-03-12 13:09:43 INFO Library scan complete 2017-03-12 13:09:43 INFO 18 files processed 2017-03-12 13:09:43 INFO 0/0 new/modified books found and added to the database 2017-03-12 13:09:43 INFO Scanning ebook directory: /media/Books 2017-03-12 13:09:29 INFO Library scan complete 2017-03-12 13:09:29 INFO 18 files processed 2017-03-12 13:09:29 INFO 0/0 new/modified books found and added to the database 2017-03-12 13:09:29 INFO Scanning ebook directory: /media/Books 2017-03-12 13:09:21 INFO Library scan complete 2017-03-12 13:09:21 INFO 18 files processed 2017-03-12 13:09:21 INFO 0/0 new/modified books found and added to the database 2017-03-12 13:09:21 INFO Scanning ebook directory: /media/Books 2017-03-12 13:09:10 INFO Config file [/var/db/lazylibrarian/config.ini] has been updated 2017-03-12 13:08:43 INFO Magazine scan complete, found 1 magazine, 14 issues 2017-03-12 13:08:42 INFO Checking [/media/Books/_Magazines/] for magazines 2017-03-12 13:08:15 INFO Library scan complete 2017-03-12 13:08:15 INFO 18 files processed 2017-03-12 13:08:15 INFO 0/0 new/modified books found and added to the database 2017-03-12 13:08:15 INFO Scanning ebook directory: /media/Books 2017-03-12 13:06:43 INFO Database updated to version 16 2017-03-12 13:06:43 INFO Updating database to version 16, current version is 0 2017-03-12 13:06:42 INFO Web server authentication is enabled, username is 'REDACTED' 2017-03-12 13:06:42 INFO Starting LazyLibrarian web server on http://0.0.0.0:5299/ 2017-03-12 13:06:42 INFO Starting LazyLibrarian on port: 5299, webroot "" 2017-03-12 13:06:42 INFO Database is version 0, integrity check: ok 2017-03-12 13:06:42 INFO SYS_ENCODING is UTF-8 2017-03-12 13:06:42 INFO Config file loaded 2017-03-12 13:06:42 INFO Screen Log set to INFO/WARN/ERROR 2017-03-12 13:06:42 INFO Log level set to [0]- Log Directory is [/var/db/lazylibrarian/Logs] - Config level is [0] 2017-03-12 13:06:42 DEBUG General : loglevel -> 0

philborman commented 7 years ago

First thing would be to check the database schema, if you ssh in and log into the database with sqlite3 /path/to/lazylibrarian.db You should get the sqlite> prompt. .schema Should list all database tables. We need to know the columns in the books table, and also if there is a table called temp_table and if so, what columns are in that one. Note that the .schema command starts with a period.

To get out of sqlite3, type .quit

akhan23wgu commented 7 years ago

Here is the .schema output: database.txt

CREATE TABLE books (AuthorID TEXT, BookName TEXT, BookSub TEXT, BookDesc TEXT, BookGenre TEXT, BookIsbn TEXT, BookPub TEXT, BookRate INTEGER, BookImg TEXT, BookPages INTEGER, BookLink TEXT, BookID TEXT UNIQUE, BookFile TEXT, BookDate TEXT, BookLang TEXT, BookAdded TEXT, Status TEXT, WorkPage TEXT, Manual TEXT);

philborman commented 7 years ago

Ok so that looks fine. Back in sqlite3, try the next command, note it ends with a semicolon Select count (*) from books; This will tell you how many books are in the database, and Select bookname from books; Should list all your books;

akhan23wgu commented 7 years ago

sqlite> Select count (*) from books; 0 sqlite> Select bookname from books; sqlite>

:(

philborman commented 7 years ago

Well for whatever reason booktable is completely empty. I guess a reinstall is the best option. Don't delete the whole user directory, just the database, leave the cache and config.ini After reinstall, run the libraryscan to refill the database using as much cached data as possible
That way all you will lose is the list of wanted books.

akhan23wgu commented 7 years ago

So I reinstalled on the existing jail, no dice. I installed in a new jail, still nothing. I wiped everything related to "lazylibrarian" on the old jail, did the config from scratch and nada. I set the debug log to 2 and I see why now...however I don't know the fix.

Specifically the line "- DEBUG :: LIBRARYSYNC : Add authors to database is disabled 12-Mar-2017 16:39:05 - INFO :: LIBRARYSYNC : Scanning ebook directory: /media/Books 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : [/media/Books] Now scanning subdirectory /Rajiv Chandrasekaran/Imperial Life in the Emerald City 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : book meta [9780307265920] [en] [Rajiv Chandrasekaran] [Imperial Life in the Emerald City] [epub] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : file meta [9780307265920] [eng] [Rajiv Chandrasekaran] [Imperial Life in the Emerald City] [] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Found Language [eng] ISBN [9780307265920] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Cached Lang [eng] ISBN [030] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Failed to match author [Rajiv Chandrasekaran] in database 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Add authors to database is disabled 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : [/media/Books] Now scanning subdirectory /Rajiv Chandrasekaran/Imperial Life in the Emerald City 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : book meta [9780307265920] [en] [Rajiv Chandrasekaran] [Imperial Life in the Emerald City] [mobi] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : file meta [9780307265920] [eng] [Rajiv Chandrasekaran] [Imperial Life in the Emerald City] [] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Found Language [eng] ISBN [9780307265920] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Already cached Lang [eng] ISBN [030] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Failed to match author [Rajiv Chandrasekaran] in database 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Add authors to database is disabled 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : [/media/Books] Now scanning subdirectory /Cormac McCarthy/The Road 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : book meta [9780307267450] [en] [The Road] [Cormac McCarthy] [mobi] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : File meta incomplete in 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Found Language [en] ISBN [9780307267450] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Already cached Lang [en] ISBN [030] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Failed to match author [The Road] in database 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Add authors to database is disabled 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : [/media/Books] Now scanning subdirectory /Anthony Bourdain/Kitchen Confidential 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : book meta [] [en] [Anthony Bourdain] [Kitchen Confidential] [epub] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : file meta [] [eng] [Anthony Bourdain] [Kitchen Confidential] [] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Failed to match author [Anthony Bourdain] in database 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Add authors to database is disabled 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : [/media/Books] Now scanning subdirectory /Anthony Bourdain/Kitchen Confidential 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : book meta [] [en] [Anthony Bourdain] [Kitchen Confidential] [mobi] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : file meta [] [eng] [Anthony Bourdain] [Kitchen Confidential] [] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Failed to match author [Anthony Bourdain] in database 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Add authors to database is disabled 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : [/media/Books] Now scanning subdirectory /#HTML 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : File meta incomplete in 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Pattern match failed [Scripting and Programming Foundations _ Quizlet.pdf] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : [/media/Books] Now scanning subdirectory /Neil Gaiman/Anansi Boys 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : book meta [] [de] [Gaiman, Neil] [Anansi Boys] [epub] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : file meta [] [en-US] [Neil Gaiman] [Anansi Boys] [] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Failed to match author [Neil Gaiman] in database 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Add authors to database is disabled 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : [/media/Books] Now scanning subdirectory /Neil Gaiman/Anansi Boys 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : book meta [] [de] [Gaiman, Neil] [Anansi Boys] [mobi] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : file meta [] [en-US] [Neil Gaiman] [Anansi Boys] [] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Failed to match author [Neil Gaiman] in database 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Add authors to database is disabled 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : [/media/Books] Now scanning subdirectory /Neil Gaiman/American Gods 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : book meta [9780380789030] [zh-cn] [Neil Gaiman] [American Gods] [mobi] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : File meta incomplete in 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Found Language [zh-cn] ISBN [9780380789030] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Cached Lang [zh-cn] ISBN [038] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Failed to match author [Neil Gaiman] in database 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Add authors to database is disabled 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : [/media/Books] Now scanning subdirectory /Neil Gaiman/American Gods 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : book meta [9780380789030] [zh-CN] [Neil Gaiman] [American Gods] [epub] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : File meta incomplete in 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Found Language [zh-CN] ISBN [9780380789030] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Already cached Lang [zh-CN] ISBN [038] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Failed to match author [Neil Gaiman] in database 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Add authors to database is disabled 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : [/media/Books] Now scanning subdirectory /Richard Matheson/I Am Legend 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : book meta [] [en] [Richard Matheson] [I Am Legend] [epub] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : file meta [] [eng] [Richard Matheson] [I Am Legend] [] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Failed to match author [Richard Matheson] in database 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Add authors to database is disabled 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : [/media/Books] Now scanning subdirectory /Richard Matheson/I Am Legend 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : book meta [] [en] [Richard Matheson] [I Am Legend] [mobi] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : file meta [] [eng] [Richard Matheson] [I Am Legend] [] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Failed to match author [Richard Matheson] in database 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Add authors to database is disabled 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : [/media/Books] Now scanning subdirectory /Erik Larson 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : book meta [9780739303405] [en] [Erik Larson; Tony Goldwyn] [The Devil in the White City: Murder, Magic & Madness and the Fair That Changed America] [mobi] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : File meta incomplete in 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Found Language [en] ISBN [9780739303405] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Cached Lang [en] ISBN [073] 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Failed to match author [Erik Larson; Tony Goldwyn] in database 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Add authors to database is disabled 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : [/media/Books] Now scanning subdirectory /Gary A. Donahue/Network Warrior 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : File meta incomplete in 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Failed to match author [Gary A. Donahue] in database 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Add authors to database is disabled 12-Mar-2017 16:39:05 - INFO :: LIBRARYSYNC : 0/0 new/modified books found and added to the database 12-Mar-2017 16:39:05 - INFO :: LIBRARYSYNC : 18 files processed 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : No missing WorkPages 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : GoodReads was hit 0 times for books 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : GoodReads was hit 0 times for languages 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : LibraryThing was hit 0 times for languages 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Language cache was hit 0 times 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Unwanted language removed 0 books 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Unwanted characters removed 0 books 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Unable to cache language for 0 books with missing ISBN 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Found 0 duplicate books 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Rescan 0 hits, 0 miss 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Cache 1 hit, 10 miss 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : ISBN Language cache holds 3 entries 12-Mar-2017 16:39:05 - DEBUG :: LIBRARYSYNC : Updating bookcounts for 1 author 12-Mar-2017 16:39:05 - INFO :: LIBRARYSYNC : Library scan complete

akhan23wgu commented 7 years ago

It seems like I can't hit the API either.

Additional Logs:

2017-03-12 17:17:26 DEBUG Searching for book with id: 17470674 2017-03-12 17:17:14 DEBUG The GoodReads API was hit 0 times for keyword fahrenheit 451 2017-03-12 17:17:14 DEBUG Found 20 results with keyword: fahrenheit 451 2017-03-12 17:17:14 DEBUG CacheHandler: Returning CACHED response for http://www.goodreads.com/search.xml?q=fahrenheit+451&key=ckvsiSDsuqh7omh74ZZ6Q 2017-03-12 17:17:14 DEBUG Searching for fahrenheit 451 at: http://www.goodreads.com/search.xml?q=fahrenheit+451&key=ckvsiSDsuqh7omh74ZZ6Q 2017-03-12 17:17:14 DEBUG Now searching GoodReads API with keyword: fahrenheit 451 2017-03-12 17:14:37 DEBUG Searching for book with id: 172327 2017-03-12 17:14:37 DEBUG Get Book Work - Invalid bookID [172327] 2017-03-12 17:14:37 DEBUG Unable to insert 3, 36746 into seriesauthors 2017-03-12 17:14:37 DEBUG Get Book Work - Invalid bookID [172327] 2017-03-12 17:14:37 DEBUG Get Book Work - Invalid bookID [172327] 2017-03-12 17:14:37 DEBUG Bookid 172327: The Ersatz Elevator added to the books database 2017-03-12 17:14:37 DEBUG [Lemony Snicket] Processing info for authorID: 36746 2017-03-12 17:14:37 DEBUG CacheHandler: Storing XML for http://www.goodreads.com/author/show/36746.xml?key=ckvsiSDsuqh7omh74ZZ6Q 2017-03-12 17:14:36 DEBUG CacheHandler: Storing XML for http://www.goodreads.com/api/author_url/Lemony%20Snicket?key=ckvsiSDsuqh7omh74ZZ6Q 2017-03-12 17:14:36 DEBUG Searching for author with name: Lemony Snicket 2017-03-12 17:14:36 DEBUG CacheHandler: Storing XML for https://www.goodreads.com/book/show/172327?key=ckvsiSDsuqh7omh74ZZ6Q 2017-03-12 17:14:30 DEBUG The GoodReads API was hit 0 times for keyword lemony snicket 2017-03-12 17:14:30 DEBUG Found 20 results with keyword: lemony snicket 2017-03-12 17:14:30 DEBUG CacheHandler: Storing XML for http://www.goodreads.com/search.xml?q=lemony+snicket&key=ckvsiSDsuqh7omh74ZZ6Q 2017-03-12 17:14:29 DEBUG Searching for lemony snicket at: http://www.goodreads.com/search.xml?q=lemony+snicket&key=ckvsiSDsuqh7omh74ZZ6Q 2017-03-12 17:14:29 DEBUG Now searching GoodReads API with keyword: lemony snicket 2017-03-12 17:14:07 INFO Debug log display ON, loglevel is 2

akhan23wgu commented 7 years ago

With the GoogleBooks API...looks like it finds it, but doesn't continue after I click "Add"

2017-03-12 17:32:44 DEBUG Searching for book with id: xaaQVduMZeoC 2017-03-12 17:32:44 ERROR Failed query: [DELETE from member WHERE BookID=xaaQVduMZeoC] 2017-03-12 17:32:44 ERROR Database error: no such column: xaaQVduMZeoC 2017-03-12 17:32:44 DEBUG Get Book Work - Invalid bookID [xaaQVduMZeoC] 2017-03-12 17:32:44 DEBUG The Paradise Snare Star Wars Legends (The Han Solo Trilogy) added to the books database 2017-03-12 17:32:44 DEBUG [A.C. Crispin] Processing info for authorID: 61277 2017-03-12 17:32:44 DEBUG CacheHandler: Storing XML for http://www.goodreads.com/author/show/61277.xml?key=ckvsiSDsuqh7omh74ZZ6Q 2017-03-12 17:32:43 DEBUG CacheHandler: Storing XML for http://www.goodreads.com/api/author_url/A.C.%20Crispin?key=ckvsiSDsuqh7omh74ZZ6Q 2017-03-12 17:32:42 DEBUG Searching for author with name: A.C. Crispin 2017-03-12 17:32:42 DEBUG CacheHandler: Storing JSON for https://www.googleapis.com/books/v1/volumes/xaaQVduMZeoC?key=AIzaSyAkHCl_M4lw8K5fcvxXlqe4-pdPvRwfPDo 2017-03-12 17:32:36 DEBUG The Google Books API was hit 17 times for keyword star wars 2017-03-12 17:32:36 DEBUG Showing 531 results for (intitle:) with keyword: star wars 2017-03-12 17:32:36 DEBUG Removed 53 books with no author 2017-03-12 17:32:36 DEBUG Removed 46 unwanted language results 2017-03-12 17:32:36 DEBUG Found 630 total results

philborman commented 7 years ago

Ok, makes more sense. The "Add authors to database is disabled" is a config setting. In config, processing tab, Add Authors tickbox needs to be ticked (and save config afterwards). Needs to be made clearer, a warning rather than a debug message I think.

The goodreads api is working, you got a cached response, so we didn't need to ask goodreads, we already had the info from an earlier run.

Googlebooks not working is a bug. I forgot that googlebooks uses alphanumeric book id, where goodreads is just digits.

Just submitted a fix for the googlebooks bug, and a warning message if "add authors" is disabled on library scan.

If you have a backup copy of your old database you could put it back and it should work now :-)

akhan23wgu commented 7 years ago

Thanks philborman! I appreciate your diligence. I just went ahead and did a rescan of my library with Add Authors enabled, and was able to restore all my books. I'll have to go back and add my wanted books, but not a big deal.

Update: After attempting to add books, it looks like LL is only adding books that have the authors added.

Example Scenario: Search for Book1 > Add Book1 > LL sets Book1 as "Wanted", but does not search for Book1. Book1 is not displayed under the Books tab as "Wanted", but is shown as "Wanted" when searched. Search for Book1 again > Add Author for said Book1 > LL shows the book under the "Books" tab, and actively searches and grabs the book.

This scenario occurs whether or not I have the "Add Author" option ticked.

philborman commented 7 years ago

Yes, there is another option in the config for that, in the processing tab, search when added.

Tick to search immediately, if unticked the search only happens when the next cron job runs. Lets you mark lots of books as wanted and then only run one search for them all instead of individual search per book.

On 13/03/17 14:21, akhan23wgu wrote:

Thanks philborman! I appreciate your diligence. I just went ahead and did a rescan of my library with Add Authors enabled, and was able to restore all my books. I'll have to go back and add my wanted books, but not a big deal.

Update: After attempting to add books, it looks like LL is only adding books that have the authors added.

Example Scenario: Search for Book1 > Add Book1 > LL sets Book1 as "Wanted", but does not search for Book1. Book1 is not displayed under the Books tab as "Wanted", but is shown as "Wanted" when searched. Search for Book1 again > Add Author for said Book1 > LL shows the book under the "Books" tab, and actively searches and grabs the book.

This scenario occurs whether or not I have the "Add Author" option ticked.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/DobyTang/LazyLibrarian/issues/689#issuecomment-286104844, or mute the thread https://github.com/notifications/unsubscribe-auth/ALmHOZK_pPhsUSD6o7kBP3gcd9YLaTAeks5rlULdgaJpZM4ManDH.

akhan23wgu commented 7 years ago

I have that box checked, even tried unchecking and re-checking. Even verified in the config that it's enabled. No dice. Debug log doesn't display any useful info afaik.

2017-03-13_08h21_27

philborman commented 7 years ago

I'm not clear on what the code is trying to do when you add a book for an author who is not in the database. It looks like we fire off a search for the book with goodreads/googlebooks, but then ignore the results? I don't think we can add a book to the database without having the author there, maybe we should add the author first, or maybe it's intended as a way of bypassing the database but still downloading the book ?

On 13/03/17 14:21, akhan23wgu wrote:

Thanks philborman! I appreciate your diligence. I just went ahead and did a rescan of my library with Add Authors enabled, and was able to restore all my books. I'll have to go back and add my wanted books, but not a big deal.

Update: After attempting to add books, it looks like LL is only adding books that have the authors added.

Example Scenario: Search for Book1 > Add Book1 > LL sets Book1 as "Wanted", but does not search for Book1. Book1 is not displayed under the Books tab as "Wanted", but is shown as "Wanted" when searched. Search for Book1 again > Add Author for said Book1 > LL shows the book under the "Books" tab, and actively searches and grabs the book.

This scenario occurs whether or not I have the "Add Author" option ticked.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/DobyTang/LazyLibrarian/issues/689#issuecomment-286104844, or mute the thread https://github.com/notifications/unsubscribe-auth/ALmHOZK_pPhsUSD6o7kBP3gcd9YLaTAeks5rlULdgaJpZM4ManDH.

akhan23wgu commented 7 years ago

I used to be able to add books without adding the Authors before the update - was anything changed significantly 2-3 commits before the database changes?

philborman commented 7 years ago

Yes, the authorname is not kept in the book table any more. This is because eventually we want to be able to list multiple authors per book. Not there yet, but at this point in the process adding a book without knowing the author isn't possible.

We now (as of a few minutes ago) keep an "ignored" entry for the author in the authors table so we can still grab books without the author showing up in lists or searches, and without grabbing a list of all the authors books. Seems to be working ok, a bit more testing and it should be ok to release later today.

On 14/03/17 17:05, akhan23wgu wrote:

I used to be able to add books without adding the Authors before the update - was anything changed significantly 2-3 commits before the database changes?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/DobyTang/LazyLibrarian/issues/689#issuecomment-286470196, or mute the thread https://github.com/notifications/unsubscribe-auth/ALmHOc-p7i-rsrvFuyKJTycwfUC84RnRks5rlrrngaJpZM4ManDH.

akhan23wgu commented 7 years ago

Sounds good :)

I currently have a post-processing script running to send my ebooks to my kindle account using Kindlegen. Here's the logic behind it, and I think it can be easily implemented into LL.

  1. LL Downloads copy of ebook a. Supported formats = .mobi, .kpf, .pdf, .azq, .azw3, .txt, .prc (taken from Config > Importing > File Formats > ebooks) b. Scripts

    • kindlegen (Official Amazon tool, handles epub to mobi conversion)
    • sendkindle.py (sends to kindle via SMTP)
    • epub-to-mobi.py (logic handling if conversion is needed, otherwise executes sendkindle.py) c. LL's post-processing executes the epub-to-mobi.py, and checks if the file is a .epub, if so it executes kindlegen, and converts the file to the .mobi format. d. In the next step, the script checks if the file falls under the "supported formats" listed. If true, it sends the file to kindle email address. If false, nothing is done.

I'll probably be working on tying the scripts to LL, as I'm still pretty new to python, and need to get used to the code. Do you have an email or contact I can reach out if I have any questions?

philborman commented 7 years ago

No problem. You can email me at phil.borman@gmail.com if you want.

Rather than tying directly in to the postprocessor it would be neater to create a new "notifier" so that each time we send a "notify downloaded" message you trigger your script as one of the notifiers. The notifiers are passed a message giving the name of the book downloaded, you can look that up in the database, read the filename from the "book" table and go from there. If you want to do it completely outside of lazylibrarian you could use the email notifier to get the message with the book name, and the lazylibrarian api to get the filename.

Bear in mind when you download a book you might get multiple formats in the one download.

On Tue, 14 Mar 2017 at 18:10 akhan23wgu notifications@github.com wrote:

Sounds good :)

I currently have a post-processing script running to send my ebooks to my kindle account using Kindlegen. Here's the logic behind it, and I think it can be easily implemented into LL.

1.

LL Downloads copy of ebook a. Supported formats = .mobi, .kpf, .pdf, .azq, .azw3, .txt, .prc (taken from Config > Importing > File Formats > ebooks) b. Scripts

  • kindlegen (Official Amazon tool, handles epub to mobi conversion)
  • sendkindle.py (sends to kindle via SMTP)
  • epub-to-mobi.py (logic handling if conversion is needed, otherwise executes sendkindle.py)

    c. LL's post-processing executes the epub-to-mobi.py, and checks if the file is a .epub, if so it executes kindlegen, and converts the file to the .mobi format. d. In the next step, the script checks if the file falls under the "supported formats" listed. If true, it sends the file to kindle email address. If false, nothing is done.

I'll probably be working on tying the scripts to LL, as I'm still pretty new to python, and need to get used to the code. Do you have an email or contact I can reach out if I have any questions?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/DobyTang/LazyLibrarian/issues/689#issuecomment-286492004, or mute the thread https://github.com/notifications/unsubscribe-auth/ALmHOfdvVm7_ZNLoZ4JIrrG5Wczrz17fks5rlsoMgaJpZM4ManDH .

philborman commented 7 years ago

There is a new custom notifier in the next release that should make it easier for you to do what you want. The notifier calls a script that is passed a bunch of parameters including the file location. You can pass that to your converter, email it to kindle etc. There will be a couple of basic example scripts in the package to get you started.

On Tue, 14 Mar 2017, 21:50 Phil Borman, phil.borman@gmail.com wrote:

No problem. You can email me at phil.borman@gmail.com if you want.

Rather than tying directly in to the postprocessor it would be neater to create a new "notifier" so that each time we send a "notify downloaded" message you trigger your script as one of the notifiers. The notifiers are passed a message giving the name of the book downloaded, you can look that up in the database, read the filename from the "book" table and go from there. If you want to do it completely outside of lazylibrarian you could use the email notifier to get the message with the book name, and the lazylibrarian api to get the filename.

Bear in mind when you download a book you might get multiple formats in the one download.

On Tue, 14 Mar 2017 at 18:10 akhan23wgu notifications@github.com wrote:

Sounds good :)

I currently have a post-processing script running to send my ebooks to my kindle account using Kindlegen. Here's the logic behind it, and I think it can be easily implemented into LL.

1.

LL Downloads copy of ebook a. Supported formats = .mobi, .kpf, .pdf, .azq, .azw3, .txt, .prc (taken from Config > Importing > File Formats > ebooks) b. Scripts

  • kindlegen (Official Amazon tool, handles epub to mobi conversion)
  • sendkindle.py (sends to kindle via SMTP)
  • epub-to-mobi.py (logic handling if conversion is needed, otherwise executes sendkindle.py)

    c. LL's post-processing executes the epub-to-mobi.py, and checks if the file is a .epub, if so it executes kindlegen, and converts the file to the .mobi format. d. In the next step, the script checks if the file falls under the "supported formats" listed. If true, it sends the file to kindle email address. If false, nothing is done.

I'll probably be working on tying the scripts to LL, as I'm still pretty new to python, and need to get used to the code. Do you have an email or contact I can reach out if I have any questions?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/DobyTang/LazyLibrarian/issues/689#issuecomment-286492004, or mute the thread https://github.com/notifications/unsubscribe-auth/ALmHOfdvVm7_ZNLoZ4JIrrG5Wczrz17fks5rlsoMgaJpZM4ManDH .

philborman commented 7 years ago

Closing this one (unable to add books) as fixed now. If you want help with the notifier please open a new issue or email me direct. Thanks