mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
fix: announcer not updated after torrent announce list edited (#4635)
This commit is contained in:
@@ -1102,6 +1102,7 @@ char const* addTrackerUrls(tr_torrent* tor, tr_variant* urls)
|
||||
}
|
||||
|
||||
tor->announceList().save(tor->torrentFile());
|
||||
tor->on_announce_list_changed();
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
@@ -1128,6 +1129,7 @@ char const* replaceTrackers(tr_torrent* tor, tr_variant* urls)
|
||||
}
|
||||
|
||||
tor->announceList().save(tor->torrentFile());
|
||||
tor->on_announce_list_changed();
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
@@ -1154,6 +1156,7 @@ char const* removeTrackers(tr_torrent* tor, tr_variant* ids)
|
||||
}
|
||||
|
||||
tor->announceList().save(tor->torrentFile());
|
||||
tor->on_announce_list_changed();
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -845,7 +845,10 @@ public:
|
||||
|
||||
void fetch(tr_web::FetchOptions&& options) const
|
||||
{
|
||||
web_->fetch(std::move(options));
|
||||
if (web_)
|
||||
{
|
||||
web_->fetch(std::move(options));
|
||||
}
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr auto const& bandwidthGroups() const noexcept
|
||||
|
||||
@@ -2189,8 +2189,7 @@ bool tr_torrent::setTrackerList(std::string_view text)
|
||||
}
|
||||
}
|
||||
|
||||
/* tell the announcer to reload this torrent's tracker list */
|
||||
this->session->announcer_->resetTorrent(this);
|
||||
on_announce_list_changed();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -788,6 +788,13 @@ public:
|
||||
return announce_key_;
|
||||
}
|
||||
|
||||
// should be called when done modifying the torrent's announce list.
|
||||
void on_announce_list_changed()
|
||||
{
|
||||
markEdited();
|
||||
session->announcer_->resetTorrent(this);
|
||||
}
|
||||
|
||||
tr_torrent_metainfo metainfo_;
|
||||
|
||||
tr_bandwidth bandwidth_;
|
||||
|
||||
Reference in New Issue
Block a user