mkb79 / audible-cli

A command line interface for audible package. With the cli you can download your Audible books, cover, chapter files.
GNU Affero General Public License v3.0
423 stars 45 forks source link

Error 18 downloading and saving to mapped device #203

Closed HardyElektronik closed 3 months ago

HardyElektronik commented 3 months ago

I've running audible in a container with proxmox and have a folder on my nas mapped as a device inside this container.

Everytime I'm downloading something I get the following error:

error: [Errno 18] Invalid cross-device link: '2d070ae501799085cf9fe6d52d76b87b-9.resume' -> '/mnt/nas/xxxxxx.aaxc'
No new files downloaded.
error: Aborted with Asyncio CancelledError

Some search at Google showed, it may be an issue with Python itself: https://stackoverflow.com/questions/42392600/oserror-errno-18-invalid-cross-device-link

Is there a chance to get this problem solved?

mkb79 commented 3 months ago

Can you try out to change the current working directory to the target directory /mnt/nas/ and run the command again? If this works, I have a solution for your issue.

Background: The resume file, created by audible-cli, are placed in your current working directory. If the download finished successfully, the method pathlib.Path.rename is used to rename (and move) the file to the target location. If the current working directory and target directory are on different file systems, this will probably raise your error.

HardyElektronik commented 3 months ago

Jap... works.

Tried the command from /mnt/nas and there's no error. Files getting saved.

mkb79 commented 3 months ago

Good to hear that. I'll rework audible-cli to save the resume file in the target directory. I'll inform you, when the changes are released. In the meantime please do not use the --output-dir or -o option of the download command or change your CWD to the output directory