X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fchannelaggregator.cpp;h=8097af180e51fe03d44ed32383b50b61cc8e42f9;hb=HEAD;hp=2fcf42b5d0f8fdca1430e819e78535159477fc3a;hpb=92723c9ba6a5553e1b136692d99f3bf76b9d5d1c;p=minitube diff --git a/src/channelaggregator.cpp b/src/channelaggregator.cpp index 2fcf42b..8097af1 100644 --- a/src/channelaggregator.cpp +++ b/src/channelaggregator.cpp @@ -81,9 +81,6 @@ void ChannelAggregator::run() { updatedChannels.clear(); updatedChannels.squeeze(); - if (!Database::instance().getConnection().transaction()) - qWarning() << "Transaction failed" << __PRETTY_FUNCTION__; - processNextChannel(); } @@ -135,7 +132,7 @@ void ChannelAggregator::parseWebPage(const QByteArray &bytes) { } else { currentChannel->updateChecked(); currentChannel = 0; - processNextChannel(); + QTimer::singleShot(5000, this, &ChannelAggregator::processNextChannel); } } @@ -175,9 +172,6 @@ void ChannelAggregator::reallyProcessChannel(YTChannel *channel) { void ChannelAggregator::finish() { currentChannel = 0; - QSqlDatabase db = Database::instance().getConnection(); - if (!db.commit()) qWarning() << "Commit failed" << __PRETTY_FUNCTION__; - #ifdef Q_OS_MAC if (newVideoCount > 0 && unwatchedCount > 0 && mac::canNotify()) { QString channelNames; @@ -207,8 +201,10 @@ void ChannelAggregator::videosLoaded(const QVector