1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-22 07:42:37 +00:00

fix: parsing sitename info from 3.xx Servers (#6438)

This commit is contained in:
Nick 2024-01-07 19:10:04 +01:00 committed by GitHub
parent 7fd29d2d46
commit 632b7048fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -178,8 +178,14 @@ bool change(TrackerStat& setme, tr_variant const* value)
changed = true;
}
if (site_changed && !setme.sitename.isEmpty() && !setme.announce.isEmpty() && trApp != nullptr)
if (site_changed && !setme.announce.isEmpty() && trApp != nullptr)
{
if (setme.sitename.isEmpty())
{
QStringList const separated_host = QUrl{ setme.announce }.host().split(QStringLiteral("."));
setme.sitename = separated_host.at(separated_host.size() - 2);
}
setme.announce = trApp->intern(setme.announce);
trApp->load_favicon(setme.announce);
}