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

Missing buttons for Manage Audiobook section #1624

Closed saitoh183 closed 5 years ago

saitoh183 commented 5 years ago

Ebooks: image

Audiobooks:

image

philborman commented 5 years ago

Yes that's intentional. The buttons are all to do with ebooks, not audiobooks, at the moment anyway. Not having the buttons just makes it clearer. Actually that's all except for goodreads sync, could add that one in.

philborman commented 5 years ago

Next version of lazylibrarian has separate csv for audio/ebook so there will be buttons

saitoh183 commented 5 years ago

so until then , i cant manually add audiobooks that havent been snatched by LL or is there a way around that?

philborman commented 5 years ago

Drop them into the audiobook folder structure, each book in a separate folder, and run libraryscan from the audiobook page. Lazylibrarian will read the id3 tags and import them. If you have "rename books" ticked in config it will rename/move them into subfolders matching the config options.

saitoh183 commented 5 years ago

So i added the folder to my /audiobooks and then went under audiobooks and clicked on libraryscan but nothing happened

image

image

image

philborman commented 5 years ago

Would need to see a debug log. Not clear what's going on from the screenshots

philborman commented 5 years ago

Just pushed the version with added buttons on the manage page. Should be able to import from the alternate directory too now, but the debug log should show why the libraryscan did not work

saitoh183 commented 5 years ago
18-Oct-2018 14:49:33 - DEBUG   :: AUDIOBOOK_SCAN : librarysync.py:LibraryScan:562 : [/audiobooks] Now scanning subdirectory /M.Y.T.H. Inc. Link - Robert Lynn Asprin
18-Oct-2018 14:49:33 - DEBUG   :: AUDIOBOOK_SCAN : librarysync.py:LibraryScan:629 : file meta [] [Unknown] [Robert Lynn Asprin] [M.Y.T.H. Inc. Link] [148205]
18-Oct-2018 14:49:33 - DEBUG   :: AUDIOBOOK_SCAN : librarysync.py:find_book_in_db:172 : Searching database for [M.Y.T.H. Inc. Link] by [Robert Lynn Asprin]
18-Oct-2018 14:49:33 - DEBUG   :: AUDIOBOOK_SCAN : librarysync.py:find_book_in_db:198 : Exact match [M.Y.T.H. Inc. Link]
18-Oct-2018 14:49:33 - DEBUG   :: AUDIOBOOK_SCAN : bookrename.py:audioProcess:140 : M.Y.T.H. Inc. Link found 1 audiofile
18-Oct-2018 14:49:33 - WARNING :: AUDIOBOOK_SCAN : bookrename.py:audioProcess:146 : M.Y.T.H. Inc. Link: Incorrect number of parts (found 4 from 1)
18-Oct-2018 14:49:33 - DEBUG   :: AUDIOBOOK_SCAN : importer.py:update_totals:389 : Updated totals for [Robert Lynn Asprin]
18-Oct-2018 14:49:33 - INFO    :: AUDIOBOOK_SCAN : librarysync.py:LibraryScan:1026 : 0/0 new/modified AudioBooks found and added to the database

image

I will update to the new version and see

philborman commented 5 years ago

Ah - it's a single file audiobook, I haven't got any of those to try. Might still hit the same issue. I think your audio file probably doesn't have any id3 tags, or at least doesn't have all the ones we want, so we try to fake it. Badly. Will push a version that does better checks shortly.

saitoh183 commented 5 years ago

Cool thanks

saitoh183 commented 5 years ago

@philborman

After using the Import Audiobooks under manage, it seems to be keeping original files even if the option isnt checked. i dont know if this is affecting my script which works perfectly when its a auto grab from LL.

image image

saitoh183 commented 5 years ago

Ah - it's a single file audiobook, I haven't got any of those to try. Might still hit the same issue. I think your audio file probably doesn't have any id3 tags, or at least doesn't have all the ones we want, so we try to fake it. Badly. Will push a version that does better checks shortly.

Also your fix works but this method doesnt launch my custom script and putting that same audiobook in the manual import folder doesnt work.

19-Oct-2018 10:21:51 - DEBUG   :: IMPORTALT : postprocess.py:processAlternate:83 : Processing AudioBook directory /downloads/LazyLibrarian/manualimport
19-Oct-2018 10:21:51 - DEBUG   :: IMPORTALT : postprocess.py:processAlternate:83 : Processing AudioBook directory /downloads/LazyLibrarian/manualimport/M.Y.T.H. Inc. Link - Robert Lynn Asprin
19-Oct-2018 10:21:51 - WARNING :: IMPORTALT : postprocess.py:processAlternate:202 : AudioBook /downloads/LazyLibrarian/manualimport/M.Y.T.H. Inc. Link - Robert Lynn Asprin/M.Y.T.H. Inc. Link - Robert Asprin 64 kbps.mp3 has no metadata, unable to import
19-Oct-2018 10:21:51 - WARNING :: IMPORTALT : postprocess.py:processAlternate:146 : No audiobook file found in /downloads/LazyLibrarian/manualimport
philborman commented 5 years ago

With no metadata we have no way of determining author and title from the manual import folder. Maybe simplest use an id3 tag editor to add metadata to the file. Missing metadata doesn't matter if lazylibrarian downloaded the file as we know what we asked for.

philborman commented 5 years ago

Will look into the audio import not removing original files, not sure what's going on there, the screenshot above seems to show the first few files (052.mp3 to 065.mp3) have not been renamed to match the "Part x of y" format, but the others have? Strangely the ones that are not renamed have a later timestamp?

saitoh183 commented 5 years ago

It was just a snippet of the content. All files were renamed but all originals remained and a playlist.ll was also created. I don't know what is causing my script to fail zipping up the content of the folder but until that problem is fixed, I can't determine if my script is the problem.

saitoh183 commented 5 years ago

With no metadata we have no way of determining author and title from the manual import folder. Maybe simplest use an id3 tag editor to add metadata to the file. Missing metadata doesn't matter if lazylibrarian downloaded the file as we know what we asked for.

@philborman

But why does it work with library scan when I put the folder in the /audiobook. It was able to rename it and it still didn't have id3 information

philborman commented 5 years ago

Will look into this later. Out of action at the moment doing an ubuntu upgrade. Looks like it worked from the /audiobook folder because we got file meta [] [Unknown] [Robert Lynn Asprin] [M.Y.T.H. Inc. Link] [148205] Searching database for [M.Y.T.H. Inc. Link] by [Robert Lynn Asprin] but can't see where the file meta came from as it's not id3 tags M.Y.T.H. Inc. Link - Robert Asprin 64 kbps.mp3 has no metadata does the file meta message mean we found an .opf file?