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

LL not importing #1428

Closed dkids closed 6 years ago

dkids commented 6 years ago

Not sure what's happening after download. I set debug level back to 1 but maybe I should have kept it at 3. I had been thinking there was a problem with torrent downloads in particular but only one of these is that. The other two are direct.

I will reset to 3 and try searching.

screenshot-2018-5-19 lazylibrarian - books

ls Pintip\ Dunn\ -\ The\ Darkest\ Lie\ LL.(26020141).fail/ The Darkest Lie - Pintip Dunn.epub

19-May-2018 21:01:24 - INFO :: SEARCHALLBOOKS : resultlist.py:findBestResult:208 : Best match (106%): Pintip Dunn The Darkest Lie retail epub using general search, http://127.0.0.1:9117/api/v2.0/indexers/torrentdownloads/results/torznab priority 8 19-May-2018 21:01:37 - INFO :: SEARCHALLBOOKS : resultlist.py:findBestResult:208 : Best match (107%): Pintip Dunn The Darkest Lie epub using book search, libgen.io/foreignfiction/index.php priority 1 19-May-2018 21:01:37 - INFO :: SEARCHALLBOOKS : searchbook.py:search_book:298 : Requesting eBook download: 107% libgen.io/foreignfiction/index.php: Pintip Dunn The Darkest Lie epub 19-May-2018 21:02:09 - INFO :: SEARCHALLBOOKS : resultlist.py:downloadResult:267 : Downloading eBook Pintip Dunn - The Darkest Lie LL.(26020141) from libgen.io/foreignfiction/index.php 19-May-2018 21:31:47 - ERROR :: POSTPROCESS : postprocess.py:import_book:1226 : Postprocessing for The Darkest Lie - Pintip Dunn has failed: Calibre failed to import Pintip Dunn The Darkest Lie, no added bookids 19-May-2018 21:31:47 - WARNING :: POSTPROCESS : postprocess.py:import_book:1234 : Residual files remain in /Users/kids/Downloads/Books/Pintip Dunn - The Darkest Lie LL.(26020141).fail 19-May-2018 21:38:54 - WARNING :: WEBSERVER : webServe.py:libraryScanAuthor:1377 : Unable to find author directory: /Users/kids/Calibre/Pintip Dunn

screenshot-2018-5-19 lazylibrarian - books 2

ls Shannon\ Hale\ -\ The\ Goose\ Girl\ LL.(179064).fail/ The Goose Girl - Shannon Hale.mobi

rep "Goose Girl" ~/src/LazyLibrarian-master/Logs/lazylibrarian.log
19-May-2018 17:02:14 - INFO :: SEARCHBOOK : resultlist.py:findBestResult:208 : Best match (104%): Shannon Hale The Goose Girl The Books of Bayern epub using general search, http://127.0.0.1:9117/api/v2.0/indexers/torrentz2/results/torznab priority 10 19-May-2018 17:02:32 - INFO :: SEARCHBOOK : resultlist.py:findBestResult:208 : Best match (108%): Shannon Hale The Goose Girl mobi using book search, libgen.io/foreignfiction/index.php priority 1 19-May-2018 17:02:32 - INFO :: SEARCHBOOK : searchbook.py:search_book:298 : Requesting eBook download: 108% libgen.io/foreignfiction/index.php: Shannon Hale The Goose Girl mobi 19-May-2018 17:02:44 - INFO :: SEARCHBOOK : resultlist.py:downloadResult:267 : Downloading eBook Shannon Hale - The Goose Girl LL.(179064) from libgen.io/foreignfiction/index.php 19-May-2018 17:11:40 - ERROR :: POSTPROCESS : postprocess.py:processDir:807 : Postprocessing for The Goose Girl - Shannon Hale has failed: Calibre failed to import Shannon Hale The Goose Girl, no added bookids 19-May-2018 17:11:40 - WARNING :: POSTPROCESS : postprocess.py:processDir:828 : Residual files remain in /Users/kids/Downloads/Books/Shannon Hale - The Goose Girl LL.(179064).fail 19-May-2018 21:30:49 - INFO :: SEARCHALLBOOKS : resultlist.py:findBestResult:205 : Nearest match (17%): WYSIWYG Web Builder SeuPirate using general search for Shannon Hale The Goose Girl 19-May-2018 21:30:52 - INFO :: SEARCHALLBOOKS : resultlist.py:findBestResult:205 : Nearest match (17%): WYSIWYG Web Builder SeuPirate using shortgeneral search for Shannon Hale The Goose Girl 19-May-2018 21:30:52 - INFO :: SEARCHALLBOOKS : searchbook.py:search_book:289 : NZB Searches for eBook Shannon Hale The Goose Girl: (The Books of Bayern, #1) returned no results. 19-May-2018 21:31:10 - INFO :: SEARCHALLBOOKS : resultlist.py:findBestResult:208 : Best match (108%): Shannon Hale The Goose Girl MOBI using book search, libgen.io/foreignfiction/index.php priority 1 19-May-2018 21:31:10 - INFO :: SEARCHALLBOOKS : searchbook.py:search_book:298 : Requesting eBook download: 108% libgen.io/foreignfiction/index.php: Shannon Hale The Goose Girl MOBI

screenshot-2018-5-19 lazylibrarian - books 1

ls Spindle\ Fire\ by\ Lexa\ Hillyer\ (ePUB)[WWRG].fail/ Spindle Fire (Spindle Fire #1) - Lexa Hillyer.epub grep "Spindle" ~/src/LazyLibrarian-master/Logs/lazylibrarian.log
18-May-2018 19:35:10 - INFO :: SEARCHALLBOOKS : searchbook.py:search_book:289 : DIRECT Searches for eBook Lexa Hillyer Spindle Fire returned no results. 18-May-2018 20:45:02 - INFO :: SEARCHALLBOOKS : searchbook.py:search_book:289 : DIRECT Searches for eBook Lexa Hillyer Spindle Fire returned no results. 19-May-2018 02:33:12 - INFO :: SEARCHALLBOOKS : searchbook.py:search_book:289 : DIRECT Searches for eBook Lexa Hillyer Spindle Fire returned no results. 19-May-2018 08:48:56 - INFO :: SEARCHALLBOOKS : searchbook.py:search_book:289 : DIRECT Searches for eBook Lexa Hillyer Spindle Fire returned no results. 19-May-2018 15:00:54 - INFO :: SEARCHALLBOOKS : searchbook.py:search_book:289 : DIRECT Searches for eBook Lexa Hillyer Spindle Fire returned no results. 19-May-2018 18:22:49 - INFO :: SEARCHALLBOOKS : resultlist.py:findBestResult:208 : Best match (94%): Spindle Fire by Lexa Hillyer ePUBWWRG using general search, http://127.0.0.1:9117/api/v2.0/indexers/torrentdownloads/results/torznab priority 8 19-May-2018 18:23:03 - INFO :: SEARCHALLBOOKS : searchbook.py:search_book:289 : DIRECT Searches for eBook Lexa Hillyer Spindle Fire returned no results. 19-May-2018 18:23:03 - INFO :: SEARCHALLBOOKS : searchbook.py:search_book:298 : Requesting eBook download: 94% http://127.0.0.1:9117/api/v2.0/indexers/torrentdownloads/results/torznab: Spindle Fire by Lexa Hillyer ePUBWWRG 19-May-2018 18:23:14 - INFO :: SEARCHALLBOOKS : resultlist.py:downloadResult:267 : Downloading eBook Lexa Hillyer - Spindle Fire (Spindle Fire #1) LL.(30163661) from http://127.0.0.1:9117/api/v2.0/indexers/torrentdownloads/results/torznab 19-May-2018 18:32:52 - ERROR :: POSTPROCESS : postprocess.py:processDir:807 : Postprocessing for Spindle Fire (Spindle Fire #1) - Lexa Hillyer has failed: Calibre failed to import Lexa Hillyer Spindle Fire (Spindle Fire #1), no added bookids 19-May-2018 18:32:52 - WARNING :: POSTPROCESS : postprocess.py:processDir:828 : Residual files remain in /Users/kids/Downloads/Books/Spindle Fire by Lexa Hillyer (ePUB)[WWRG].fail

dkids commented 6 years ago

darkest.txt goose.txt

Spindle Fire is showing as snatched right now so I can't search it.

philborman commented 6 years ago

The Pintip Dunn book says 19-May-2018 21:38:54 - WARNING :: WEBSERVER : webServe.py:libraryScanAuthor:1377 : Unable to find author directory: /Users/kids/Calibre/Pintip Dunn so either Calibre failed to import it, or imported it under a different author name to the one we are expecting. Can you check calibre?

The other two are direct downloads from libgen but you are getting 404 errors trying to get the book, which is libgen saying the link it gave you can't be found. Problem their end I think.

If you upgraded lazylibrarian in the last couple of days the higher debug levels have changed. Values over 2 are now a bitmask so level 3 isn't right any more. Will send a followup msg with details later.

philborman commented 6 years ago

Ok, the normal debug level 2 will give enough info, but there is definitely a libgen issue at the moment. Tried it from a browser and it seems their site is giving links that don't work. Hopefully they will get it fixed soon.

dkids commented 6 years ago

ls -al ~/Calibre/Pintip\ Dunn/ total 0 drwxr-xr-x 4 kids staff 136 May 20 09:28 . drwxr-xr-x 700 kids staff 23800 May 20 09:28 .. drwxr-xr-x 5 kids staff 170 May 20 09:28 Forget Tomorrow (11626) drwxr-xr-x 5 kids staff 170 May 20 09:28 Remember Yesterday (11627)

When I've done manual downloads, I've seen 504 errors. You modified LL so it would delete those.

I did get something downloaded for both books:

ls -al Spindle\ Fire\ by\ Lexa\ Hillyer\ (ePUB)[WWRG].fail/ total 5168 drwxr-xr-x@ 3 kids staff 102 May 19 18:32 . drwxr-xr-x 27 kids staff 918 May 20 09:36 .. -rw-r--r-- 1 kids staff 2645811 May 19 18:23 Spindle Fire (Spindle Fire #1) - Lexa Hillyer.epub

ls -al Shannon\ Hale\ -\ The\ Goose\ Girl\ LL.(179064).fail/ total 1200 drwxr-xr-x 3 kids staff 102 May 19 22:22 . drwxr-xr-x 27 kids staff 918 May 20 09:36 .. -rw-r--r-- 1 kids staff 612402 May 19 22:13 The Goose Girl - Shannon Hale.mobi

I checked Calibre and it had both books.

ls -al ~/Calibre/Lexa\ Hillyer/ total 0 drwxr-xr-x 3 kids staff 102 May 18 08:34 . drwxr-xr-x 700 kids staff 23800 May 20 09:28 .. drwxr-xr-x 5 kids staff 170 May 18 08:34 Spindle Fire (11456)

ls -al ~/Calibre/Shannon\ Hale/ total 0 drwxr-xr-x 27 kids staff 918 May 11 13:13 . drwxr-xr-x 700 kids staff 23800 May 20 09:28 .. drwxr-xr-x 5 kids staff 170 May 8 14:52 The Forgotten Sisters (7841) drwxr-xr-x 5 kids staff 170 May 8 11:08 The Goose Girl (7764) drwxr-xr-x 5 kids staff 170 May 11 13:13 The Storybook of Legends (10344)

I don't think Library Scan works 100% because it seems to miss books. I've found that I need to pick authors, go to their page, do an eBook Scan and that does seem to work 100%. I need to do better research on this.

Right now my books directory looks like this:

ls -al Books total 20080 -rw-r--r--@ 1 kids staff 840140 May 20 05:17 27 Hours - Tristina Wright.epub -rw-r--r--@ 1 kids staff 1065779 May 20 00:32 A New Darkness - Joseph Delaney.epub drwxr-xr-x 3 kids staff 102 May 20 08:37 A New Darkness - Joseph Delaney.unpack.fail drwxr-xr-x@ 4 kids staff 136 May 19 16:49 Change Agent - Daniel Suarez [EN EPUB MOBI] [ebook] [ps] -rw-r--r--@ 1 kids staff 2163994 May 19 17:00 E Lockhart - Genuine Fraud [REPOST].epub drwxr-xr-x 3 kids staff 102 May 19 14:57 Hugh Howey - Wool (Wool #1) LL.(12287209).fail -rw-r--r--@ 1 kids staff 705592 May 19 17:29 Influx by Daniel Suarez [ePub] - Traitor.epub drwxr-xr-x@ 3 kids staff 102 May 20 08:23 Ink and Bone - (The Great Library 1) - Rachel Caine drwxr-xr-x 3 kids staff 102 May 19 14:27 Joseph Delaney - A New Darkness LL.(18460033).fail -rw-r--r--@ 1 kids staff 2423998 May 20 03:39 Malinda Lo - A Line in the Dark.epub -rw-r--r--@ 1 kids staff 886661 May 19 17:57 Mark Greaney - Agent in Place.epub -rw-r--r--@ 1 kids staff 415066 May 19 17:34 Patricia Briggs - Burn Bright .epub drwxr-xr-x 3 kids staff 102 May 20 09:28 Pintip Dunn - The Darkest Lie LL.(26020141).fail drwxr-xr-x@ 5 kids staff 170 May 20 09:37 Sarah Dessen - Once and for All drwxr-xr-x 3 kids staff 102 May 18 15:10 Sarah Mlynowski - Fishbowl LL.(26208) drwxr-xr-x 3 kids staff 102 May 19 22:22 Shannon Hale - The Goose Girl LL.(179064).fail drwxr-xr-x@ 3 kids staff 102 May 19 18:32 Spindle Fire by Lexa Hillyer (ePUB)[WWRG].fail -rw-r--r--@ 1 kids staff 373294 May 20 08:38 Split Second (Pivot Point) - Kasie West.epub drwxr-xr-x@ 4 kids staff 136 May 20 09:37 The Becoming of Noah Shaw drwxr-xr-x@ 3 kids staff 102 May 20 08:37 The Fandom by Anna Day EPUB -rw-r--r--@ 1 kids staff 638518 May 19 17:03 The Iron Warrior - Julie Kagawa.epub drwxr-xr-x@ 3 kids staff 102 May 19 15:38 Whichwood by Tahereh Mafi EPUB -rw-r--r--@ 1 kids staff 715366 May 20 02:58 topshelfbook.org Kiera Cass - The Heir - (The Selection Series # 4).epub

27 Hours has not been imported to Calibre

The Joseph Delaney book was:

l /Users/kids/Calibre/Joseph\ Delaney/ total 0 drwxr-xr-x 23 kids staff 782 May 18 08:17 . drwxr-xr-x 700 kids staff 23800 May 20 09:59 .. drwxr-xr-x 5 kids staff 170 May 17 10:49 A Coven of Witches (11304) drwxr-xr-x 5 kids staff 170 May 18 08:17 A New Darkness (11453) drwxr-xr-x 5 kids staff 170 May 17 08:19 Arena 13_ The Prey (11243)

Change Agent, Genuine Fraud, Influx were imported.

Wool has some complications because of there being an Omnibus Edition, etc. Some of the changes you've made possible make it much better. Before, I have the impression that an anthology would be added and it would bring in 12 authors. And each of them would be set to "wanted". Then any co-authors would be brought in. And the number of authors and books exploded.

Hmmm. 27 Hours just got imported. I have set the log level back to 2 and I will add that logging. Not sure why it took 5 hours to process.

27.txt

20-May-2018 10:18:32 - WARNING :: POSTPROCESS : postprocess.py:processDir:752 : TRANSMISSION is seeding torznab 27 Hours - Tristina Wright.epub 20-May-2018 10:18:32 - DEBUG :: POSTPROCESS : postprocess.py:processDir:765 : Removing 27 Hours - Tristina Wright.epub from transmission 20-May-2018 10:18:32 - DEBUG :: POSTPROCESS : transmission.py:removeTorrent:200 : 27 Hours - Tristina Wright.epub has not finished seeding yet, torrent will not be removed, will try again on next run 20-May-2018 10:18:32 - DEBUG :: POSTPROCESS : postprocess.py:processDir:783 : Deleted 27 Hours - Tristina Wright.epub, torznab from transmission

That's confusing. Is it removing the file or not removing the book? The directory is still there and it's still in transmission.

philborman commented 6 years ago

Yes it's confusing. Line 752 is a warning transmission is seeding and you have "keep seeding" set so we won't delete the torrent Line 765 we ask transmission to delete the torrent but line 200 says transmission said no. We shouldn't really have asked, but we did. I will change this. Line 783 is saying it deleted the files. Badly worded message. It deleted the files we unpacked, leaving the original torrent files so transmission can continue seeding. The message from transmission saying "will retry again on next run" is also badly worded. Its only correct if transmission has seeding limits set which is outside our control.

Not sure why some books are not getting imported on libraryscan, but the log should show. Would take a bit of trawling through to find it though. Need to see which book(s) didn't get imported using the "now scanning subdirectory..." message as a start, then check the following log lines to see if/why it got rejected.

philborman commented 6 years ago

Couple of additional things to mention... You have messages in your log "Calibre failed to import xxxx, no added bookids" Latest version reports more info on why. It's usually Calibre already has the book in it's database. Also you said 27 hours took 5 hours to be imported? The log file 27.txt shows it took only 3 minutes from search to processing complete. I'm guessing an earlier search got aborted and we auto-searched for another one? I will close this for now, please retry with latest version and re-open if the issue is still there. Thanks.