mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 20:44:15 +00:00
Paused torrents could be displayed as connected for a sec after checking
This commit is contained in:
parent
1588cd5d3d
commit
ab588b741e
1
TODO
1
TODO
@ -77,3 +77,4 @@ LANGUAGES UPDATED:
|
|||||||
beta6->beta7 changelog:
|
beta6->beta7 changelog:
|
||||||
- FEATURE: Made search engine plugin install more reliable
|
- FEATURE: Made search engine plugin install more reliable
|
||||||
- BUGFIX: Updated man page / README / INSTALL
|
- BUGFIX: Updated man page / README / INSTALL
|
||||||
|
- BUGFIX: Paused torrents could be displayed as connected for a sec after checking
|
||||||
|
@ -209,6 +209,10 @@ void FinishedTorrents::updateFinishedList(){
|
|||||||
}
|
}
|
||||||
Q_ASSERT(row != -1);
|
Q_ASSERT(row != -1);
|
||||||
if(h.is_paused()) continue;
|
if(h.is_paused()) continue;
|
||||||
|
if(BTSession->getTorrentsToPauseAfterChecking().indexOf(hash) != -1) {
|
||||||
|
finishedListModel->setData(finishedListModel->index(row, F_PROGRESS), QVariant((double)h.progress()));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if(h.state() == torrent_status::downloading || (h.state() != torrent_status::checking_files && h.state() != torrent_status::queued_for_checking && h.progress() < 1.)) {
|
if(h.state() == torrent_status::downloading || (h.state() != torrent_status::checking_files && h.state() != torrent_status::queued_for_checking && h.progress() < 1.)) {
|
||||||
// What are you doing here? go back to download tab!
|
// What are you doing here? go back to download tab!
|
||||||
qDebug("Info: a torrent was moved from finished to download tab");
|
qDebug("Info: a torrent was moved from finished to download tab");
|
||||||
@ -218,10 +222,8 @@ void FinishedTorrents::updateFinishedList(){
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(h.state() == torrent_status::checking_files){
|
if(h.state() == torrent_status::checking_files){
|
||||||
if(BTSession->getTorrentsToPauseAfterChecking().indexOf(hash) == -1) {
|
finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/time.png"))), Qt::DecorationRole);
|
||||||
finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/time.png"))), Qt::DecorationRole);
|
setRowColor(row, QString::fromUtf8("grey"));
|
||||||
setRowColor(row, QString::fromUtf8("grey"));
|
|
||||||
}
|
|
||||||
finishedListModel->setData(finishedListModel->index(row, F_PROGRESS), QVariant((double)h.progress()));
|
finishedListModel->setData(finishedListModel->index(row, F_PROGRESS), QVariant((double)h.progress()));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -372,6 +372,10 @@ void DownloadingTorrents::updateDlList() {
|
|||||||
Q_ASSERT(row != -1);
|
Q_ASSERT(row != -1);
|
||||||
// No need to update a paused torrent
|
// No need to update a paused torrent
|
||||||
if(h.is_paused()) continue;
|
if(h.is_paused()) continue;
|
||||||
|
if(BTSession->getTorrentsToPauseAfterChecking().indexOf(hash) != -1) {
|
||||||
|
DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)h.progress()));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
// Parse download state
|
// Parse download state
|
||||||
// Setting download state
|
// Setting download state
|
||||||
switch(h.state()) {
|
switch(h.state()) {
|
||||||
@ -384,10 +388,8 @@ void DownloadingTorrents::updateDlList() {
|
|||||||
continue;
|
continue;
|
||||||
case torrent_status::checking_files:
|
case torrent_status::checking_files:
|
||||||
case torrent_status::queued_for_checking:
|
case torrent_status::queued_for_checking:
|
||||||
if(BTSession->getTorrentsToPauseAfterChecking().indexOf(hash) == -1) {
|
DLListModel->setData(DLListModel->index(row, NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/time.png"))), Qt::DecorationRole);
|
||||||
DLListModel->setData(DLListModel->index(row, NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/time.png"))), Qt::DecorationRole);
|
setRowColor(row, QString::fromUtf8("grey"));
|
||||||
setRowColor(row, QString::fromUtf8("grey"));
|
|
||||||
}
|
|
||||||
DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)h.progress()));
|
DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)h.progress()));
|
||||||
break;
|
break;
|
||||||
case torrent_status::connecting_to_tracker:
|
case torrent_status::connecting_to_tracker:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user