mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-24 05:25:37 +00:00
Allow setting seq & first/last from context menu without metadata
This commit is contained in:
parent
6c9a4df515
commit
7ed0d13de2
@ -963,27 +963,23 @@ void TransferListWidget::displayListMenu(const QPoint&)
|
|||||||
oneHasMetadata = true;
|
oneHasMetadata = true;
|
||||||
if (!torrent->isSeed()) {
|
if (!torrent->isSeed()) {
|
||||||
oneNotSeed = true;
|
oneNotSeed = true;
|
||||||
if (torrent->hasMetadata()) {
|
if (first) {
|
||||||
if (first) {
|
sequentialDownloadMode = torrent->isSequentialDownload();
|
||||||
sequentialDownloadMode = torrent->isSequentialDownload();
|
prioritizeFirstLast = torrent->hasFirstLastPiecePriority();
|
||||||
prioritizeFirstLast = torrent->hasFirstLastPiecePriority();
|
}
|
||||||
}
|
else {
|
||||||
else {
|
if (sequentialDownloadMode != torrent->isSequentialDownload())
|
||||||
if (sequentialDownloadMode != torrent->isSequentialDownload())
|
allSameSequentialDownloadMode = false;
|
||||||
allSameSequentialDownloadMode = false;
|
if (prioritizeFirstLast != torrent->hasFirstLastPiecePriority())
|
||||||
if (prioritizeFirstLast != torrent->hasFirstLastPiecePriority())
|
allSamePrioFirstlast = false;
|
||||||
allSamePrioFirstlast = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!oneNotSeed && allSameSuperSeeding && torrent->hasMetadata()) {
|
if (!oneNotSeed && allSameSuperSeeding && torrent->hasMetadata()) {
|
||||||
if (first) {
|
if (first)
|
||||||
superSeedingMode = torrent->superSeeding();
|
superSeedingMode = torrent->superSeeding();
|
||||||
}
|
|
||||||
else if (superSeedingMode != torrent->superSeeding())
|
else if (superSeedingMode != torrent->superSeeding())
|
||||||
allSameSuperSeeding = false;
|
allSameSuperSeeding = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!torrent->isForced())
|
if (!torrent->isForced())
|
||||||
@ -1082,7 +1078,7 @@ void TransferListWidget::displayListMenu(const QPoint&)
|
|||||||
listMenu.addAction(&actionPreviewFile);
|
listMenu.addAction(&actionPreviewFile);
|
||||||
addedPreviewAction = true;
|
addedPreviewAction = true;
|
||||||
}
|
}
|
||||||
if (oneNotSeed && oneHasMetadata) {
|
if (oneNotSeed) {
|
||||||
if (allSameSequentialDownloadMode) {
|
if (allSameSequentialDownloadMode) {
|
||||||
actionSequentialDownload.setChecked(sequentialDownloadMode);
|
actionSequentialDownload.setChecked(sequentialDownloadMode);
|
||||||
listMenu.addAction(&actionSequentialDownload);
|
listMenu.addAction(&actionSequentialDownload);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user