mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 22:18:05 -06:00
Fix compilation error with libtorrent v0.14
This commit is contained in:
@@ -882,7 +882,11 @@ QTorrentHandle Bittorrent::addMagnetUri(QString magnet_uri, bool resumed) {
|
|||||||
}
|
}
|
||||||
QString torrent_name = misc::magnetUriToName(magnet_uri);
|
QString torrent_name = misc::magnetUriToName(magnet_uri);
|
||||||
const QString savePath(getSavePath(hash, false, QString::null, torrent_name));
|
const QString savePath(getSavePath(hash, false, QString::null, torrent_name));
|
||||||
if(!defaultTempPath.isEmpty() && !TorrentPersistentData::isSeed(hash) && !TorrentTempData::isSeedingMode(hash)) {
|
if(!defaultTempPath.isEmpty() && !TorrentPersistentData::isSeed(hash)
|
||||||
|
#if LIBTORRENT_VERSION_MINOR > 14
|
||||||
|
&& !TorrentTempData::isSeedingMode(hash)
|
||||||
|
#endif
|
||||||
|
) {
|
||||||
qDebug("addMagnetURI: Temp folder is enabled.");
|
qDebug("addMagnetURI: Temp folder is enabled.");
|
||||||
qDebug("addTorrent::Temp folder is enabled.");
|
qDebug("addTorrent::Temp folder is enabled.");
|
||||||
QString torrent_tmp_path = defaultTempPath.replace("\\", "/");
|
QString torrent_tmp_path = defaultTempPath.replace("\\", "/");
|
||||||
@@ -1134,7 +1138,11 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr
|
|||||||
} else {
|
} else {
|
||||||
savePath = getSavePath(hash, fromScanDir, path, root_folder);
|
savePath = getSavePath(hash, fromScanDir, path, root_folder);
|
||||||
}
|
}
|
||||||
if(!defaultTempPath.isEmpty() && !TorrentPersistentData::isSeed(hash) && !TorrentTempData::isSeedingMode(hash)) {
|
if(!defaultTempPath.isEmpty() && !TorrentPersistentData::isSeed(hash)
|
||||||
|
#if LIBTORRENT_VERSION_MINOR > 14
|
||||||
|
&& !TorrentTempData::isSeedingMode(hash)
|
||||||
|
#endif
|
||||||
|
) {
|
||||||
qDebug("addTorrent::Temp folder is enabled.");
|
qDebug("addTorrent::Temp folder is enabled.");
|
||||||
QString torrent_tmp_path = defaultTempPath.replace("\\", "/");
|
QString torrent_tmp_path = defaultTempPath.replace("\\", "/");
|
||||||
if(!root_folder.isEmpty()) {
|
if(!root_folder.isEmpty()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user