mirror of
https://github.com/transmission/transmission
synced 2025-01-03 05:25:52 +00:00
fix: parsing sitename info from 3.xx Servers (#6438)
This commit is contained in:
parent
7fd29d2d46
commit
632b7048fe
1 changed files with 7 additions and 1 deletions
|
@ -178,8 +178,14 @@ bool change(TrackerStat& setme, tr_variant const* value)
|
||||||
changed = true;
|
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);
|
setme.announce = trApp->intern(setme.announce);
|
||||||
trApp->load_favicon(setme.announce);
|
trApp->load_favicon(setme.announce);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue