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: add new method setTags to upsert tags on torrents #22156

Merged
merged 10 commits into from
Jan 24, 2025
Prev Previous commit
Next Next commit
fix: handle potential empty hash
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
zze0s and Chocobo1 authored Jan 19, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit aae62440186a3fe6f693e6dd2ed1cbba20aefdec
2 changes: 1 addition & 1 deletion src/webui/api/torrentscontroller.cpp
Original file line number Diff line number Diff line change
@@ -1479,7 +1479,7 @@ void TorrentsController::setTagsAction()
{
requireParams({u"hashes"_s, u"tags"_s});

const QStringList hashes {params()[u"hashes"_s].split(u'|')};
const QStringList hashes {params()[u"hashes"_s].split(u'|', Qt::SkipEmptyParts)};
const QStringList tags {params()[u"tags"_s].split(u',', Qt::SkipEmptyParts)};

// Convert QStringList to TagSet