mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 15:27:54 +00:00
Remove (mostly) useless log warnings about tracker's favicon.
This commit is contained in:
parent
34f893e8ad
commit
7923b54456
@ -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…
Reference in New Issue
Block a user