mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-01-12 10:07:27 +03:00
Relax behavior of "Download first and last piece first"
Now it applies the setting to all files in torrent, no matter whether the file is previewable or not. Torrent client shouldn't be smart by deciding which file this option will be applied to, i.e. it should just follow the user's decision.
This commit is contained in:
parent
00c886e426
commit
0d8189efeb
1 changed files with 0 additions and 8 deletions
|
@ -786,10 +786,6 @@ bool TorrentHandle::hasFirstLastPiecePriority() const
|
|||
if (filePriorities[i] <= 0)
|
||||
continue;
|
||||
|
||||
const QString ext = Utils::Fs::fileExtension(filePath(i));
|
||||
if (!Utils::Misc::isPreviewable(ext))
|
||||
continue;
|
||||
|
||||
const TorrentInfo::PieceRange extremities = info().filePieces(i);
|
||||
const int firstPiecePrio = nativeHandle().piece_priority(extremities.first());
|
||||
const int lastPiecePrio = nativeHandle().piece_priority(extremities.last());
|
||||
|
@ -1311,10 +1307,6 @@ void TorrentHandle::setFirstLastPiecePriority(const bool enabled)
|
|||
if (filePrio <= 0)
|
||||
continue;
|
||||
|
||||
const QString ext = Utils::Fs::fileExtension(filePath(index));
|
||||
if (!Utils::Misc::isPreviewable(ext))
|
||||
continue;
|
||||
|
||||
// Determine the priority to set
|
||||
const int newPrio = enabled ? 7 : filePrio;
|
||||
const TorrentInfo::PieceRange extremities = info().filePieces(index);
|
||||
|
|
Loading…
Reference in a new issue