diff --git a/src/base/bittorrent/sessionimpl.cpp b/src/base/bittorrent/sessionimpl.cpp index 465b3ef73..6005e8158 100644 --- a/src/base/bittorrent/sessionimpl.cpp +++ b/src/base/bittorrent/sessionimpl.cpp @@ -1416,7 +1416,13 @@ void SessionImpl::initializeNativeSession() break; } #endif + +#if LIBTORRENT_VERSION_NUM < 20100 m_nativeSession = new lt::session(sessionParams, lt::session::paused); +#else + m_nativeSession = new lt::session(sessionParams); + m_nativeSession->pause(); +#endif LogMsg(tr("Peer ID: \"%1\"").arg(QString::fromStdString(peerId)), Log::INFO); LogMsg(tr("HTTP User-Agent: \"%1\"").arg(USER_AGENT), Log::INFO); diff --git a/src/base/bittorrent/torrentinfo.cpp b/src/base/bittorrent/torrentinfo.cpp index 64726c0d4..2a32ad653 100644 --- a/src/base/bittorrent/torrentinfo.cpp +++ b/src/base/bittorrent/torrentinfo.cpp @@ -30,6 +30,7 @@ #include #include +#include #include #include @@ -292,8 +293,12 @@ QVector TorrentInfo::urlSeeds() const for (const lt::web_seed_entry &webSeed : nativeWebSeeds) { +#if LIBTORRENT_VERSION_NUM < 20100 if (webSeed.type == lt::web_seed_entry::url_seed) urlSeeds.append(QUrl(QString::fromStdString(webSeed.url))); +#else + urlSeeds.append(QUrl(QString::fromStdString(webSeed.url))); +#endif } return urlSeeds;