diff --git a/src/base/bittorrent/session.cpp b/src/base/bittorrent/session.cpp index 7bbf3c6af..559d380c1 100644 --- a/src/base/bittorrent/session.cpp +++ b/src/base/bittorrent/session.cpp @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -2196,6 +2197,8 @@ bool Session::addTorrent_impl(const std::variant &source else p.flags |= lt::torrent_flags::auto_managed; + p.added_time = std::time(nullptr); + if (!isFindingIncompleteFiles) return loadTorrent(loadTorrentParams); diff --git a/src/base/bittorrent/torrentimpl.cpp b/src/base/bittorrent/torrentimpl.cpp index 4ffa3ee0b..ed09d0696 100644 --- a/src/base/bittorrent/torrentimpl.cpp +++ b/src/base/bittorrent/torrentimpl.cpp @@ -1804,8 +1804,6 @@ void TorrentImpl::prepareResumeData(const lt::add_torrent_params ¶ms) m_ltAddTorrentParams = params; } - m_ltAddTorrentParams.added_time = addedTime().toSecsSinceEpoch(); - // We shouldn't save upload_mode flag to allow torrent operate normally on next run m_ltAddTorrentParams.flags &= ~lt::torrent_flags::upload_mode;