ping / odmpy

A simple command line manager for OverDrive/Libby loans. Download your library loans from the command line.
GNU General Public License v3.0
333 stars 22 forks source link

Unable to find Metadata in ODM #76

Open mjeshurun opened 4 months ago

mjeshurun commented 4 months ago

Hi friends,

I tried to download an audiobook using the python command, but I'm getting the "ValueError: Unable to find Metadata in ODM" error message.

`odmpy libby --latest 1 odmpy Interactive Client for Libby

Non-interactive mode. Downloading latest 1 loan... Opening audiobook "Pimsleur Hebrew Level 1"... Already downloaded odm file pimsleur-hebrew-level-1-390557.odm An unexpected error has occurred Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/odmpy/odm.py", line 983, in run process_odm( File "/usr/local/lib/python3.9/site-packages/odmpy/processing/odm.py", line 135, in process_odm raise ValueError("Unable to find Metadata in ODM") ValueError: Unable to find Metadata in ODM Traceback (most recent call last): File "/usr/local/bin/odmpy", line 8, in sys.exit(main()) File "/usr/local/lib/python3.9/site-packages/odmpy/main.py", line 27, in main run() File "/usr/local/lib/python3.9/site-packages/odmpy/odm.py", line 983, in run process_odm( File "/usr/local/lib/python3.9/site-packages/odmpy/processing/odm.py", line 135, in process_odm raise ValueError("Unable to find Metadata in ODM") ValueError: Unable to find Metadata in ODM`

Is there a known fix for this issue?

wtanksleyjr commented 4 months ago

Unfortunately no, there is not; we did attempt a fix but it broke, we have not been able to figure out any more.

There is a workaround documented in the comments to this bug (link goes directly to the comment in question): https://github.com/ping/odmpy/issues/69#issuecomment-2078355058

Notice that you will need to download the ODM file directly from your library's whatever.overdrive.com site (you can find that by using www.overdrive.com 's library finder).

wtanksleyjr commented 4 months ago

Another quick note: you don't need to use any of the options listed in that comment. I never use merging, but I normally use odmpy dl -k file.odm because I prefer to have the cover image separate; but you don't even need -k. If you want more metadata (like what series it belongs to) and you know the Libby ID, I can give you a command line to get that.

mjeshurun commented 4 months ago

Many thanks for the explanations, @wtanksleyjr 🙏

mjeshurun commented 4 months ago

Hi, @wtanksleyjr

I was able to follow your instructions and download an audiobook file :)

Do you know if there is a way to open odmpy created audiobooks with the apple Books app on iOS?

I used odmpy to create a .m4b file with chapters encoded in aac, but it seems the iOS Books app cannot import it. I was able to open the file using the MacOS Books app, but not on iOS.

wtanksleyjr commented 4 months ago

Sorry, I know nothing about iOS. I'm not sure whether the Books app is supposed to handle audiobooks, though, is there still iTunes? I know that used to be the correct way.

Congrats on getting the rest to work though, I'm so glad the old ODM mode was left in.

coloradoruss commented 4 months ago

I use Smart Audio, but I think its Android only. Look here... https://www.reddit.com/r/audiobooks/comments/dbkhau/any_ios_apps_handle_remote_m4b_files_properly/

I hope they get the Libby part working at some point. Whatever they did a few months ago broke the Chrome plugin and I assume the firefox plugin. With the Libby part of odmpy not working, the only way to dl an audiobook is with the old odm file, but who knows when they will kill that off as well.

Thanks to all the coders!

Russ

Confidentiality Notice: This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message.Non-Binding and Expiration Disclaimer: Content of emails, to include any included links and attachments thereto, sent or received shall not create a binding contract or be construed to be conveyance or acceptance of any offer, contract or any other agreement, whatsoever, nor shall the same be binding on any party until a written contract is signed by all parties. In the event a bona fide, signed offer is conveyed via email, the same shall expire, if not accepted and fully executed by all parties, upon the latter of its explicitly stated expiration date or, if such a date is not specified, twenty-four hours from its initial transmission by the offeror and shall thereafter not be binding on any party.

Wire Fraud Notice: Never trust wiring instructions sent via email. Cyber criminals are hacking email accounts and sending emails with fake wiring instructions. These emails are convincing and sophisticated. Always independently confirm wiring instructions in person or via a telephone call to a trusted and verified phone number. Never wire money without double-checking that the wiring instructions are correct.

On Sun, Jul 21, 2024 at 10:27 AM William Tanksley Jr < @.***> wrote:

Sorry, I know nothing about iOS. I'm not sure whether the Books app is supposed to handle audiobooks, though, is there still iTunes? I know that used to be the correct way.

Congrats on getting the rest to work though, I'm so glad the old ODM mode was left in.

— Reply to this email directly, view it on GitHub https://github.com/ping/odmpy/issues/76#issuecomment-2241704630, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATRQTMXRX7VHS7NH6OE77Y3ZNPOQRAVCNFSM6AAAAABLGAQXPOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBRG4YDINRTGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

birlorg commented 4 months ago

it it seems the iOS Books app cannot import it. I was able to open the file using the MacOS Books app, but not on iOS.

Import it into Books.app(literally drag and drop works) on MacOS and then sync the books to your phone, the phone will see them after a sync.

mjeshurun commented 4 months ago

Thank for the tip, @birlorg . Do you know if there's a way to sync the audiobook file to the iOS Books app using a Windows based PC?

birlorg commented 4 months ago

I don't really know. I think you have to use the Music app to play audiobooks if you are syncing from Windows, Install the Apple Devices app, and then just move it as a music file. https://support.apple.com/en-ph/guide/devices-windows/mchl5ded2763/windows

mjeshurun commented 4 months ago

I don't really know. I think you have to use the Music app to play audiobooks if you are syncing from Windows, Install the Apple Devices app, and then just move it as a music file. https://support.apple.com/en-ph/guide/devices-windows/mchl5ded2763/windows

I will try. Thank you very much 🙏🙏