Skip to content
This repository was archived by the owner on Mar 15, 2025. It is now read-only.

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

Open
Valtteri-Jokinen wants to merge 1 commit into
xtream1101:mainfrom
Valtteri-Jokinen:add_torrent_download_support
Open

Content-type argument. Possible to download bittorrent files.#57
Valtteri-Jokinen wants to merge 1 commit into
xtream1101:mainfrom
Valtteri-Jokinen:add_torrent_download_support

Conversation

@Valtteri-Jokinen

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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' "

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
Copy Markdown
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants