mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 00:47:21 -06:00
Drop support of libtorrent < 1.1.10
This commit is contained in:
@@ -34,7 +34,6 @@
|
||||
#include <libtorrent/create_torrent.hpp>
|
||||
#include <libtorrent/storage.hpp>
|
||||
#include <libtorrent/torrent_info.hpp>
|
||||
#include <libtorrent/version.hpp>
|
||||
|
||||
#include <QDirIterator>
|
||||
#include <QFile>
|
||||
@@ -131,13 +130,8 @@ void TorrentCreatorThread::run()
|
||||
|
||||
if (isInterruptionRequested()) return;
|
||||
|
||||
#if LIBTORRENT_VERSION_NUM < 10100
|
||||
libt::create_torrent newTorrent(fs, m_params.pieceSize, -1
|
||||
, (m_params.isAlignmentOptimized ? libt::create_torrent::optimize : 0));
|
||||
#else
|
||||
libt::create_torrent newTorrent(fs, m_params.pieceSize, -1
|
||||
, (m_params.isAlignmentOptimized ? libt::create_torrent::optimize_alignment : 0));
|
||||
#endif
|
||||
|
||||
// Add url seeds
|
||||
for (QString seed : asConst(m_params.urlSeeds)) {
|
||||
@@ -208,11 +202,6 @@ int TorrentCreatorThread::calculateTotalPieces(const QString &inputPath, const i
|
||||
libt::file_storage fs;
|
||||
libt::add_files(fs, Utils::Fs::toNativePath(inputPath).toStdString(), fileFilter);
|
||||
|
||||
#if LIBTORRENT_VERSION_NUM < 10100
|
||||
return libt::create_torrent(fs, pieceSize, -1
|
||||
, (isAlignmentOptimized ? libt::create_torrent::optimize : 0)).num_pieces();
|
||||
#else
|
||||
return libt::create_torrent(fs, pieceSize, -1
|
||||
, (isAlignmentOptimized ? libt::create_torrent::optimize_alignment : 0)).num_pieces();
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user