Closed rocketinventor closed 4 years ago
Amazing! I just gave it a spin and seems to be working fine. The audio files with the embedded cover look great. Thanks a lot for this!
Thank you again for the merge!
Just to make note: I did not implement the following two changes yet (which you suggested, before):
The cover download/embed is super quick, so there is not much reason to avoid making it the default. Ditto with changing the default HTML image - the difference is minor.
I also wanted to add an option for using a base64-encoded image in the HTML file (as opposed to a local file or a link) - I have not done that yet, either.
New image download and audio metadata functions
Adds the functionality described in Issue #16: "Feature Request: Embed cover art into concat audio file"
The 640*640px version of the book's cover image can now be downloaded and/or embedded into the audio file using the
--embed-cover-art
and--save-cover
flags. Downloaded cover art is also used for the HTML file output.The FFmpeg tagging code has also been updated to be more readable, and it has a new "genre" (Blinkist) and "album" (book-category) tag, as well.
Fixed concat logic
Fixes a bug that was causing the audio concatenation process to get skipped. This is relevant when running the "concat" command on a book that already has all of the chapter audio downloaded (but no concat file).
Also slightly rearranges the cover-image downloading process - "cover_img_file" and "cover_tmp_file" downloads happen a little bit later now. "cover_tmp_file" will be only downloaded as necessary.
I tested these changes for various circumstances, and the code seems to behave as it should now. Feel free, however, to test it out yourself.
Might be related to #10. (Was originally fixed in pull-request #15.) Included in this pull request because it seemed to be interfering with my development process.