mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-13 08:43:08 -07:00
ETA for finished torrent is now 0 instead of Infinite (closes #583704)
Fix unicode issue in start seeding after torrent creation code
This commit is contained in:
parent
bdd8cbb1d8
commit
963d73af4e
3 changed files with 5 additions and 2 deletions
|
@ -199,7 +199,7 @@ void createtorrent::handleCreationSuccess(QString path, const char* branch_path)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QString hash = misc::toQString(t->info_hash());
|
QString hash = misc::toQString(t->info_hash());
|
||||||
TorrentTempData::setSavePath(hash, QString(branch_path));
|
TorrentTempData::setSavePath(hash, QString::fromLocal8Bit(branch_path));
|
||||||
#ifdef LIBTORRENT_0_15
|
#ifdef LIBTORRENT_0_15
|
||||||
// Enable seeding mode (do not recheck the files)
|
// Enable seeding mode (do not recheck the files)
|
||||||
TorrentTempData::setSeedingMode(hash, true);
|
TorrentTempData::setSeedingMode(hash, true);
|
||||||
|
|
|
@ -522,6 +522,9 @@ QString misc::userFriendlyDuration(qlonglong seconds) {
|
||||||
if(seconds < 0) {
|
if(seconds < 0) {
|
||||||
return QString::fromUtf8("∞");
|
return QString::fromUtf8("∞");
|
||||||
}
|
}
|
||||||
|
if(seconds == 0) {
|
||||||
|
return "0";
|
||||||
|
}
|
||||||
if(seconds < 60) {
|
if(seconds < 60) {
|
||||||
return tr("< 1m", "< 1 minute");
|
return tr("< 1m", "< 1 minute");
|
||||||
}
|
}
|
||||||
|
|
|
@ -454,7 +454,7 @@ void TransferListWidget::setFinished(QTorrentHandle &h) {
|
||||||
listModel->setData(listModel->index(row, TR_STATUS), STATE_STALLED_UP);
|
listModel->setData(listModel->index(row, TR_STATUS), STATE_STALLED_UP);
|
||||||
setRowColor(row, QApplication::palette().color(QPalette::WindowText));
|
setRowColor(row, QApplication::palette().color(QPalette::WindowText));
|
||||||
}
|
}
|
||||||
listModel->setData(listModel->index(row, TR_ETA), QVariant((qlonglong)-1));
|
listModel->setData(listModel->index(row, TR_ETA), QVariant((qlonglong)0));
|
||||||
listModel->setData(listModel->index(row, TR_DLSPEED), QVariant((double)0.));
|
listModel->setData(listModel->index(row, TR_DLSPEED), QVariant((double)0.));
|
||||||
listModel->setData(listModel->index(row, TR_PROGRESS), QVariant((double)1.));
|
listModel->setData(listModel->index(row, TR_PROGRESS), QVariant((double)1.));
|
||||||
listModel->setData(listModel->index(row, TR_PRIORITY), QVariant((int)-1));
|
listModel->setData(listModel->index(row, TR_PRIORITY), QVariant((int)-1));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue