Better icon downloading.
This commit is contained in:
parent
3e1d3583f4
commit
4dd815749e
@ -6,6 +6,7 @@ Added:
|
||||
▪ RSS Guard now can be compiled WITHOUT QtWebEngine module. Minimal Qt required was also lowered to 5.6.0.
|
||||
|
||||
Changed:
|
||||
▪ Obtaining feed metadata including icons is now improved a bit.
|
||||
▪ Big application core refactoring. Many functions rewritten, some bad code removed.
|
||||
|
||||
Fixed:
|
||||
|
@ -132,7 +132,7 @@ QNetworkReply::NetworkError NetworkFactory::downloadIcon(const QList<QString> &u
|
||||
QNetworkReply::NetworkError network_result = QNetworkReply::UnknownNetworkError;
|
||||
|
||||
foreach (const QString &url, urls) {
|
||||
const QString google_s2_with_url = QString("http://www.google.com/s2/favicons?domain=%1").arg(url.toHtmlEscaped());
|
||||
const QString google_s2_with_url = QString("http://www.google.com/s2/favicons?domain=%1").arg(QUrl(url).host());
|
||||
QByteArray icon_data;
|
||||
network_result = performNetworkOperation(google_s2_with_url, timeout, QByteArray(), QString(), icon_data,
|
||||
QNetworkAccessManager::GetOperation).first;
|
||||
|
@ -222,7 +222,7 @@ QPair<StandardFeed*,QNetworkReply::NetworkError> StandardFeed::guessFeed(const Q
|
||||
password);
|
||||
result.second = network_result.first;
|
||||
|
||||
if (result.second == QNetworkReply::NoError) {
|
||||
if (result.second == QNetworkReply::NoError || !feed_contents.isEmpty()) {
|
||||
// Feed XML was obtained, now we need to try to guess
|
||||
// its encoding before we can read further data.
|
||||
QString xml_schema_encoding;
|
||||
|
Loading…
x
Reference in New Issue
Block a user