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

Allow specifying file indices when requesting content of torrents #14716

Closed
riaqn opened this issue Apr 4, 2021 · 3 comments · Fixed by #14795
Closed

Allow specifying file indices when requesting content of torrents #14716

riaqn opened this issue Apr 4, 2021 · 3 comments · Fixed by #14795
Labels
WebAPI WebAPI-related issues/changes

Comments

@riaqn
Copy link

riaqn commented Apr 4, 2021

(Sorry I can't use the template for some reason)
When request the content of a torrent, the current WebAPI simply returns all the files. This is very wasteful when the torrent contains hundreds of files and the user is actually interested in only a few of them. I suggest we add an id parameter which is a list of file indices delimeted by |. The API should then return only the files of those indices. For backward compatiblity we can make the id parameter optional such that all files are returned when it's omitted.

Related code:

void TorrentsController::filesAction()

@thalieht thalieht added the WebAPI WebAPI-related issues/changes label Apr 4, 2021
@glassez
Copy link
Member

glassez commented Apr 8, 2021

I suggest we add an id parameter which is a list of file indices delimeted by |. The API should then return only the files of those indices.

Do you really need to obtain any arbitrary subset of files? Or maybe just some continuous one?

@riaqn
Copy link
Author

riaqn commented Apr 8, 2021

Hi @glassez . In my particular case I want to obtain files that could be non-continuous. Would that be a problem?

@riaqn riaqn changed the title [WebAPI] Allow specifying file indices when requesting content of torrents Allow specifying file indices when requesting content of torrents Apr 8, 2021
@glassez
Copy link
Member

glassez commented Apr 8, 2021

In my particular case I want to obtain files that could be non-continuous. Would that be a problem?

I think No.

@qbittorrent qbittorrent locked as resolved and limited conversation to collaborators Apr 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
WebAPI WebAPI-related issues/changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants