mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
Remove (mostly) useless log warnings about tracker's favicon.
This commit is contained in:
parent
34f893e8ad
commit
7923b54456
1 changed files with 2 additions and 11 deletions
|
@ -651,14 +651,8 @@ void TrackerFiltersList::handleFavicoDownload(const QString& url, const QString&
|
|||
QList<QSize> sizes = icon.availableSizes();
|
||||
bool invalid = (sizes.isEmpty() || icon.pixmap(sizes.first()).isNull());
|
||||
if (invalid) {
|
||||
if (url.endsWith(".ico", Qt::CaseInsensitive)) {
|
||||
Logger::instance()->addMessage(tr("Couldn't decode favicon for URL '%1'. Trying to download favicon in PNG format.").arg(url),
|
||||
Log::WARNING);
|
||||
if (url.endsWith(".ico", Qt::CaseInsensitive))
|
||||
downloadFavicon(url.left(url.size() - 4) + ".png");
|
||||
}
|
||||
else {
|
||||
Logger::instance()->addMessage(tr("Couldn't decode favicon for URL '%1'.").arg(url), Log::WARNING);
|
||||
}
|
||||
Utils::Fs::forceRemove(filePath);
|
||||
}
|
||||
else {
|
||||
|
@ -669,10 +663,7 @@ void TrackerFiltersList::handleFavicoDownload(const QString& url, const QString&
|
|||
|
||||
void TrackerFiltersList::handleFavicoFailure(const QString& url, const QString& error)
|
||||
{
|
||||
// Don't use getHost() on the url here. Print the full url. The error might relate to
|
||||
// that.
|
||||
Logger::instance()->addMessage(tr("Couldn't download favicon for URL '%1'. Reason: %2").arg(url).arg(error),
|
||||
Log::WARNING);
|
||||
Q_UNUSED(error)
|
||||
if (url.endsWith(".ico", Qt::CaseInsensitive))
|
||||
downloadFavicon(url.left(url.size() - 4) + ".png");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue