1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-23 21:14:33 +00:00

Merge pull request #9331 from thalieht/seqfirstlast

Allow setting seq & first/last from context menu without metadata
This commit is contained in:
Vladimir Golovnev 2018-08-22 17:16:44 +03:00 committed by GitHub
commit 9fa78c7b50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -963,27 +963,23 @@ void TransferListWidget::displayListMenu(const QPoint&)
oneHasMetadata = true;
if (!torrent->isSeed()) {
oneNotSeed = true;
if (torrent->hasMetadata()) {
if (first) {
sequentialDownloadMode = torrent->isSequentialDownload();
prioritizeFirstLast = torrent->hasFirstLastPiecePriority();
}
else {
if (sequentialDownloadMode != torrent->isSequentialDownload())
allSameSequentialDownloadMode = false;
if (prioritizeFirstLast != torrent->hasFirstLastPiecePriority())
allSamePrioFirstlast = false;
}
if (first) {
sequentialDownloadMode = torrent->isSequentialDownload();
prioritizeFirstLast = torrent->hasFirstLastPiecePriority();
}
else {
if (sequentialDownloadMode != torrent->isSequentialDownload())
allSameSequentialDownloadMode = false;
if (prioritizeFirstLast != torrent->hasFirstLastPiecePriority())
allSamePrioFirstlast = false;
}
}
else {
if (!oneNotSeed && allSameSuperSeeding && torrent->hasMetadata()) {
if (first) {
if (first)
superSeedingMode = torrent->superSeeding();
}
else if (superSeedingMode != torrent->superSeeding())
allSameSuperSeeding = false;
}
}
if (!torrent->isForced())
@ -1082,7 +1078,7 @@ void TransferListWidget::displayListMenu(const QPoint&)
listMenu.addAction(&actionPreviewFile);
addedPreviewAction = true;
}
if (oneNotSeed && oneHasMetadata) {
if (oneNotSeed) {
if (allSameSequentialDownloadMode) {
actionSequentialDownload.setChecked(sequentialDownloadMode);
listMenu.addAction(&actionSequentialDownload);