diff --git a/.travis.yml b/.travis.yml index e6e48187f..85401d3bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -130,29 +130,17 @@ install: fi - | if [ "$libt_branch" = "RC_1_2" ] && [ "$TRAVIS_OS_NAME" = "osx" ]; then - wget https://builds.shiki.hu/travis/brew/version - if ! cmp --quiet "version" "$HOME/travis/brew/version" ; then - echo "Cached files are different from server. Downloading new ones." - # First delete old files - rm -r "$HOME/travis/brew" - mkdir "$HOME/travis/brew" - cp "version" $HOME/travis/brew - cd "$HOME/travis/brew" - wget https://builds.shiki.hu/travis/brew/libtorrent-rasterbar.rb - wget https://builds.shiki.hu/travis/brew/f01f8d840b6eaf05df8df811815128ae6e7227977b1cba4825f0a1fb73a4d9f0--libtorrent-rasterbar-1.2.6.high_sierra.bottle.tar.gz - fi - # Copy custom libtorrent bottle to homebrew's download cache so it can find and install it - # Also install our custom libtorrent formula by passing the local path to it - # These 2 files are restored from Travis' cache. - cp "$HOME/travis/brew/f01f8d840b6eaf05df8df811815128ae6e7227977b1cba4825f0a1fb73a4d9f0--libtorrent-rasterbar-1.2.6.high_sierra.bottle.tar.gz" "$(brew --cache)/downloads" - brew uninstall libtorrent-rasterbar - brew install "$HOME/travis/brew/libtorrent-rasterbar.rb" - - # NOTE about the bottle name - # The part before the "--" characters is a sha256 hash of the string - # of the URL homebrew itself would use to download the bottle. - # In this case the URL is the following: - # http://127.0.0.1/libtorrent-rasterbar-1.2.6.high_sierra.bottle.tar.gz + # building libtorrent manually should be faster than using the official bottle + # because the bottle will also pull in a lot of updated dependencies and prolong the overall time + pushd "$HOME" + git clone --single-branch --branch RC_1_2 https://github.com/arvidn/libtorrent.git + cd libtorrent + git checkout tags/v1.2.10 + + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=14 -Ddeprecated-functions=OFF -DOPENSSL_ROOT_DIR="$openssl_root_path" ./ + make + sudo make install + popd fi script: @@ -168,7 +156,8 @@ script: mkdir build && cd build cmake $cmake_conf ../ fi - - make && make install + - make + - make install after_success: - if [ "$gui" = "true" ]; then qbt_exe="qbittorrent" ; else qbt_exe="qbittorrent-nox" ; fi diff --git a/src/base/bittorrent/torrenthandleimpl.cpp b/src/base/bittorrent/torrenthandleimpl.cpp index c068a6b5a..bbb260449 100644 --- a/src/base/bittorrent/torrenthandleimpl.cpp +++ b/src/base/bittorrent/torrenthandleimpl.cpp @@ -125,8 +125,8 @@ TorrentHandleImpl::TorrentHandleImpl(Session *session, const lt::torrent_handle , m_seedingTimeLimit(params.seedingTimeLimit) , m_hasSeedStatus(params.hasSeedStatus) , m_hasRootFolder(params.hasRootFolder) - , m_useAutoTMM(params.savePath.isEmpty()) , m_hasFirstLastPiecePriority(params.firstLastPiecePriority) + , m_useAutoTMM(params.savePath.isEmpty()) , m_ltAddTorrentParams(params.ltAddTorrentParams) { if (m_useAutoTMM)