Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download by author? #183

Open
taxilian opened this issue Feb 9, 2024 · 5 comments
Open

Download by author? #183

taxilian opened this issue Feb 9, 2024 · 5 comments

Comments

@taxilian
Copy link

taxilian commented Feb 9, 2024

Hey,

I've been using this tool for awhile -- it's fantastic, thank you so much for your work on it. Would it be possible to add support for downloading by author? Series would be even better, but I'm guessing that'd be a long shot =]

I'd be willing to take a stab at implementing it and submitting a PR, but some idea of if it's plausible and direction on where in the code to start would help.

Thanks!

@mkb79
Copy link
Owner

mkb79 commented Feb 9, 2024

@taxilian
Hi,
Yeah adding support for author or/and series, like the title option, is possible. Your help is welcome.

I'm thinking adding a method in audible_cli.models.BaseList would be the best place. An example method for searching a title is audible_cli.models.BaseList.search_item_by_title.

The authors can be accessed via the authors attribute of a BaseItem. It will give you a list like [{'asin': 'B004AQ1W8Y', 'name': 'James Corey'}, {'asin': None, 'name': 'Jürgen Langowski - Übersetzer'}]

The series can be found using series attribute of a BaseItem. The result is [{'asin': 'B07CT7ZML4', 'sequence': '9', 'title': 'The Expanse-Serie', 'url': '/pd/The-Expanse-Serie-Hoerbuch/B07CT7ZML4'}] or None.

After implementing the new method, the download command can be extended to find the author or Serie like it does for the title.

@taxilian
Copy link
Author

... huh. well, I think I can probably add "series" in easily enough, but authors is always None on every book. any idea why?

@taxilian
Copy link
Author

ad28dfb -- Here is my attempt to implement it, but since authors is always None it doesn't ever find anything. Series appears to be working, though

@mkb79
Copy link
Owner

mkb79 commented Feb 13, 2024

@taxilian

but since authors is always None it doesn't ever find anything

The reason for this is the missing contributors in the response_groups. You have to add it on Line 828 in cmd_download.py. I'm sorry I forgot to mention it before.

@taxilian
Copy link
Author

Yep, that fixed it and it works now =] PR created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants