Closed lchiocca closed 9 months ago
@lchiocca Thank you for opening this issue.
What error was displayed before changing your code when you downloaded the title?
When downloading a title in aax
format, item.is_downloadable
is called. For aaxc
titles audible-cli makes a license request and check, if the license was denied and will you shown this error.
Implementing your code has the disadvantage, that downloading cover, chapter and annotations will skipped also (although they are possible). So I would suggest to refactor the method audible_cli.models.LibraryItem.get_license
to check for item.is_downloadable
before requesting the license. This would speed up the running time in such cases a little bit.
I'm using audible-cli to make a backup of the items in my libary. I didn't have a clear instinct on which format to download so I chose aaxc. The error i was getting was error: {item.title} is not downloadable.
. All in all, correct. The problem I was facing is that I had multiple non-downloadable items and at some point the queue stopped working and hence never terminated. I'm not 100% sure, but I think three exceptions will "halt" the queue. That's where I started to investigate the issue and wanted to branch off as quickly as possible as to not even get into that situation. Using the --ignore-errors
allows it to continue, though.
Anyways, I see your points and agree on all of them. As mentioned, I modified the download command locally to do some other stuff (e.g. take only the best cover, customizable output location, decrypting the aaxc using ffmpeg and finally creating a portable, smaller opus file). I'll close this issue since the root cause isn't what I described.
I think I know why the queue is not terminated correctly when an error occurs and --ignore-errors
is not provided. I'll check this out.
Audible has these weird promotions where you can add a audiobook for free to your libary but after an unknown period of time you no longer have access to it. It is still in the libary but "locked" (you actually see a lock icon on the offical audible app). I've changed the code locally to check if the item is downloadable and that works like a charm. Here the condensed version of the change in the cmd_download.cli() method: