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

Content-type argument. Possible to download bittorrent files. #57

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Valtteri-Jokinen
Copy link

New argument:

--content-type

With this it's possible to download the bittorrent-files or direct downloads. Defaults to direct downloads.

@Valtteri-Jokinen
Copy link
Author

This is what was asked in #53

'--content-types',
type=str, nargs='*',
help="Whether to download only direct content (web) and/or the bittorrent file. Default is only direct content. "
"Available variables: 'web', 'bittorrent' "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Available variables: 'web', 'bittorrent' "
"Available types: 'web', 'bittorrent' "

@@ -40,6 +40,7 @@ def __init__(self, library_path, cookie_path=None, cookie_auth=None,
self.purchase_keys = purchase_keys
self.trove = trove
self.update = update
self.content_types = ['web'] if content_types is None else list(map(str.lower, content_types)) # noqa: E501
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to validate the types against the known list? That would protect users from typos. But also prevent downloading novel types if they ever become available (or already are?).

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

Successfully merging this pull request may close these issues.

2 participants