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

WebAPI: Provide "isPrivate" flag via "torrents/info" endpoint #20686

Merged
merged 2 commits into from May 2, 2024

Conversation

ManiMatter
Copy link
Contributor

@ManiMatter ManiMatter commented Apr 11, 2024

Currently, the "isPrivate" flag is only present on the "properties"-API:
/api/v2/torrents/properties

With this PR, I'd like to add it to the "info" -API:
/api/v2/torrents/info

Advantage: This way it can be retrieved for all torrents in one go (rather than having to query the properties-API for each hash 1 by 1)

Disclaimer: I tried to the best of my abilities to read the code and amend it (which I believe is a super simple change).
I was not able (due to my lack of skill) to build qBit with my change and test it.

Thank you very much for your review.

@ManiMatter ManiMatter changed the title Adding "isPrivate" flag to /api/v2/torrents/info (already present on /properties) [Quick Win] Adding "isPrivate" flag to /api/v2/torrents/info (already present on /properties) Apr 11, 2024
@ManiMatter ManiMatter changed the title [Quick Win] Adding "isPrivate" flag to /api/v2/torrents/info (already present on /properties) Adding "isPrivate" flag to /api/v2/torrents/info (already present on /properties) Apr 11, 2024
@glassez glassez changed the title Adding "isPrivate" flag to /api/v2/torrents/info (already present on /properties) WebAPI: Provide "isPrivate" flag via torrents/info endpoint Apr 13, 2024
@glassez glassez added the WebAPI WebAPI-related issues/changes label Apr 13, 2024
@glassez glassez added this to the 5.0 milestone Apr 13, 2024
@glassez glassez requested review from a team and removed request for a team April 13, 2024 16:31
@glassez glassez changed the title WebAPI: Provide "isPrivate" flag via torrents/info endpoint WebAPI: Provide "isPrivate" flag via "torrents/info" endpoint Apr 29, 2024
@ManiMatter
Copy link
Contributor Author

Thank you for the review and approval, @glassez

I was just thinking: the /info API supports parameters to retrieve torrents matching the filter conditions (eg by status, hash list, category, tag, etc)

Would it make sense to also add the filtration method „isPrivate“ (to retrieve either only private or non-private torrents)? Personally I‘d use this.

wdyt?

@glassez glassez merged commit 0541645 into qbittorrent:master May 2, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebAPI WebAPI-related issues/changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants