mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
- Do not update the icon when clicking "Mark all as read" on a feed that is still loading
- Added some more debug messages
This commit is contained in:
parent
f2ea524be9
commit
7a59d5e47c
@ -141,6 +141,7 @@ void subDownloadThread::run(){
|
||||
qDebug("Downloading %s", url.toLocal8Bit().data());
|
||||
if(!abort)
|
||||
res = curl_easy_perform(curl);
|
||||
qDebug("done downloading %s", url.toLocal8Bit().data());
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
fclose(f);
|
||||
@ -151,6 +152,7 @@ void subDownloadThread::run(){
|
||||
} else {
|
||||
emit downloadFinishedST(this, url, filePath);
|
||||
}
|
||||
qDebug("%s Raised the signal", url.toLocal8Bit().data());
|
||||
} else {
|
||||
std::cerr << "Could not initialize CURL" << "\n";
|
||||
}
|
||||
@ -213,6 +215,7 @@ void downloadThread::propagateDownloadedFile(subDownloadThread* st, QString url,
|
||||
Q_ASSERT(index != -1);
|
||||
subThreads.removeAt(index);
|
||||
mutex.unlock();
|
||||
qDebug("Deleting subthread");
|
||||
delete st;
|
||||
emit downloadFinished(url, path);
|
||||
mutex.lock();
|
||||
@ -220,6 +223,7 @@ void downloadThread::propagateDownloadedFile(subDownloadThread* st, QString url,
|
||||
condition.wakeOne();
|
||||
}
|
||||
mutex.unlock();
|
||||
qDebug("Out of propagateDownloadedFile");
|
||||
}
|
||||
|
||||
void downloadThread::propagateDownloadFailure(subDownloadThread* st, QString url, QString reason){
|
||||
|
@ -137,8 +137,12 @@ void RssFolder::refreshStream(QString url) {
|
||||
qDebug("Refreshing feed: %s", url.toLocal8Bit().data());
|
||||
Q_ASSERT(this->contains(url));
|
||||
RssStream *stream = (RssStream*)this->value(url);
|
||||
if(stream->isLoading()) return;
|
||||
if(stream->isLoading()) {
|
||||
qDebug("Stream %s is already being loaded...", stream->getUrl().toLocal8Bit().data());
|
||||
return;
|
||||
}
|
||||
stream->setLoading(true);
|
||||
qDebug("stream %s : loaded=true", stream->getUrl().toLocal8Bit().data());
|
||||
downloader->downloadUrl(url);
|
||||
if(!stream->hasCustomIcon()){
|
||||
downloader->downloadUrl(stream->getIconUrl());
|
||||
@ -186,6 +190,7 @@ void RssFolder::processFinishedDownload(QString url, QString path) {
|
||||
}
|
||||
stream->processDownloadedFile(path);
|
||||
stream->setLoading(false);
|
||||
qDebug("stream %s : loaded=false", stream->getUrl().toLocal8Bit().data());
|
||||
// If the feed has no alias, then we use the title as Alias
|
||||
// this is more user friendly
|
||||
if(stream->getName().isEmpty()){
|
||||
|
@ -503,7 +503,8 @@ void RSSImp::updateFeedInfos(QString url, QString aliasOrUrl, unsigned int nbUnr
|
||||
QTreeWidgetItem *item = listStreams->getTreeItemFromUrl(url);
|
||||
RssStream *stream = (RssStream*)listStreams->getRSSItem(item);
|
||||
item->setText(0, aliasOrUrl + QString::fromUtf8(" (") + QString::number(nbUnread, 10)+ QString(")"));
|
||||
item->setData(0,Qt::DecorationRole, QVariant(QIcon(stream->getIconPath())));
|
||||
if(!stream->isLoading())
|
||||
item->setData(0,Qt::DecorationRole, QVariant(QIcon(stream->getIconPath())));
|
||||
// Update parent
|
||||
if(item->parent())
|
||||
updateItemInfos(item->parent());
|
||||
|
Loading…
Reference in New Issue
Block a user