From: Flavio Tordini Date: Mon, 10 Aug 2015 08:53:29 +0000 (+0200) Subject: Fix updating of last check time X-Git-Tag: 2.5~37 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=dc6c9c2d8ca2da58f1363b6741bbd46e7a1d088d;p=minitube Fix updating of last check time --- diff --git a/src/channelaggregator.cpp b/src/channelaggregator.cpp index 97b369d..f64272b 100644 --- a/src/channelaggregator.cpp +++ b/src/channelaggregator.cpp @@ -97,7 +97,6 @@ void ChannelAggregator::processNextChannel() { YTChannel* channel = getChannelToCheck(); if (channel) { checkWebPage(channel); - channel->updateChecked(); } else finish(); } @@ -119,13 +118,20 @@ void ChannelAggregator::parseWebPage(const QByteArray &bytes) { // qDebug() << "Comparing" << videoId << latestVideoId; hasNewVideos = videoId != latestVideoId; } - if (hasNewVideos) reallyProcessChannel(currentChannel); - else processNextChannel(); + if (hasNewVideos) { + reallyProcessChannel(currentChannel); + currentChannel = 0; + } else { + currentChannel->updateChecked(); + currentChannel = 0; + processNextChannel(); + } } void ChannelAggregator::errorWebPage(QNetworkReply *reply) { Q_UNUSED(reply); reallyProcessChannel(currentChannel); + currentChannel = 0; } void ChannelAggregator::reallyProcessChannel(YTChannel *channel) { @@ -137,6 +143,8 @@ void ChannelAggregator::reallyProcessChannel(YTChannel *channel) { YTSearch *videoSource = new YTSearch(params, this); connect(videoSource, SIGNAL(gotVideos(QList)), SLOT(videosLoaded(QList))); videoSource->loadVideos(50, 1); + + channel->updateChecked(); } void ChannelAggregator::finish() {