Browse Source

Save correct resume data when added new torrent

PR #18003.
adaptive-webui-19844
Vladimir Golovnev 2 years ago committed by GitHub
parent
commit
b68c4e2106
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/base/bittorrent/sessionimpl.cpp

5
src/base/bittorrent/sessionimpl.cpp

@ -2769,9 +2769,6 @@ bool SessionImpl::addTorrent_impl(const std::variant<MagnetUri, TorrentInfo> &so @@ -2769,9 +2769,6 @@ bool SessionImpl::addTorrent_impl(const std::variant<MagnetUri, TorrentInfo> &so
p.flags |= lt::torrent_flags::duplicate_is_error;
// Prevent torrent from saving initial resume data twice
p.flags &= ~lt::torrent_flags::need_save_resume;
p.added_time = std::time(nullptr);
// Limits
@ -5265,8 +5262,6 @@ TorrentImpl *SessionImpl::createTorrent(const lt::torrent_handle &nativeHandle, @@ -5265,8 +5262,6 @@ TorrentImpl *SessionImpl::createTorrent(const lt::torrent_handle &nativeHandle,
if (isRestored())
{
m_resumeDataStorage->store(torrent->id(), params);
// The following is useless for newly added magnet
if (torrent->hasMetadata())
{

Loading…
Cancel
Save