fix: setTags grab tags from method

This commit is contained in:
ze0s 2025-01-14 19:01:02 +00:00
commit 6e4700e3ad

View file

@ -942,17 +942,14 @@ bool TorrentImpl::setTags(const TagSet &newTags)
{ {
// Identify tags to add // Identify tags to add
for (const Tag &tag : newTags) for (const Tag &tag : newTags)
{
if (!hasTag(tag)) if (!hasTag(tag))
addTag(tag); addTag(tag);
}
// Identify tags to remove // Identify tags to remove
for (const Tag &tag : asConst(m_tags)) for (const Tag &tag : asConst(tags()))
{
if (!newTags.contains(tag)) if (!newTags.contains(tag))
removeTag(tag); removeTag(tag);
}
return true; return true;
} }