Browse Source

Fix hiding of unwanted files

adaptive-webui-19844
Christophe Dumez 13 years ago
parent
commit
5d5bf403a8
  1. 6
      src/qtlibtorrent/qbtsession.cpp

6
src/qtlibtorrent/qbtsession.cpp

@ -1271,7 +1271,7 @@ add_torrent_params QBtSession::initializeAddTorrentParams(const QString &hash) {
p.storage_mode = storage_mode_sparse; p.storage_mode = storage_mode_sparse;
// Priorities // Priorities
#if LIBTORRENT_VERSION_MINOR > 15 /*#if LIBTORRENT_VERSION_MINOR > 15
if (TorrentTempData::hasTempData(hash)) { if (TorrentTempData::hasTempData(hash)) {
std::vector<int> fp; std::vector<int> fp;
TorrentTempData::getFilesPriority(hash, fp); TorrentTempData::getFilesPriority(hash, fp);
@ -1283,7 +1283,7 @@ add_torrent_params QBtSession::initializeAddTorrentParams(const QString &hash) {
p.file_priorities = fp_conv; p.file_priorities = fp_conv;
} }
} }
#endif #endif*/
// Start in pause // Start in pause
p.paused = true; p.paused = true;
@ -1303,12 +1303,10 @@ void QBtSession::loadTorrentTempData(QTorrentHandle &h, QString savePath, bool m
// The following is useless for newly added magnet // The following is useless for newly added magnet
if (!magnet) { if (!magnet) {
#if LIBTORRENT_VERSION_MINOR < 16
// Files priorities // Files priorities
vector<int> fp; vector<int> fp;
TorrentTempData::getFilesPriority(hash, fp); TorrentTempData::getFilesPriority(hash, fp);
h.prioritize_files(fp); h.prioritize_files(fp);
#endif
// Prioritize first/last piece // Prioritize first/last piece
h.prioritize_first_last_piece(TorrentTempData::isSequential(hash)); h.prioritize_first_last_piece(TorrentTempData::isSequential(hash));

Loading…
Cancel
Save