mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-26 03:06:37 +03:00
Merge pull request #12363 from glassez/fix-unexpected-resume
Fix unexpected torrent resume after app restart
This commit is contained in:
commit
96c5af7ae9
1 changed files with 1 additions and 7 deletions
|
@ -2159,14 +2159,8 @@ bool Session::addTorrent_impl(CreateTorrentParams params, const MagnetUri &magne
|
|||
|
||||
if (!fromMagnetUri) {
|
||||
if (params.restored) { // load from existing fastresume
|
||||
// Make sure the torrent will be initially checked and then paused
|
||||
// to perform some service jobs on it. We will start it if needed.
|
||||
// (Workaround to easily support libtorrent-1.1
|
||||
QByteArray patchedFastresumeData = fastresumeData;
|
||||
patchedFastresumeData.replace("6:pausedi0e", "6:pausedi1e");
|
||||
patchedFastresumeData.replace("12:auto_managedi0e", "12:auto_managedi1e");
|
||||
|
||||
// converting relative save_path to absolute
|
||||
QByteArray patchedFastresumeData = fastresumeData;
|
||||
int start = patchedFastresumeData.indexOf("9:save_path");
|
||||
if (start > -1) {
|
||||
start += 11;
|
||||
|
|
Loading…
Reference in a new issue