diff --git a/src/app/upgrade.h b/src/app/upgrade.h index b84f29f36..49c9f8afc 100644 --- a/src/app/upgrade.h +++ b/src/app/upgrade.h @@ -89,7 +89,6 @@ bool upgradeResumeFile(const QString &filepath) libtorrent::entry fastNew; fastNew = fastOld; - fastNew["qBt-addedTime"] = fastOld.dict_find_int_value("qBt-added_time"); int priority = fastOld.dict_find_int_value("qBt-queuePosition"); QFile file2(QString("%1.%2").arg(filepath).arg(priority > 0 ? priority : 0)); diff --git a/src/core/bittorrent/session.cpp b/src/core/bittorrent/session.cpp index a025b92d3..a4a97e4b3 100644 --- a/src/core/bittorrent/session.cpp +++ b/src/core/bittorrent/session.cpp @@ -2369,7 +2369,6 @@ bool loadTorrentResumeData(const QByteArray &data, AddTorrentData &out, MagnetUr libt::lazy_bdecode(data.constData(), data.constData() + data.size(), fast, ec); if ((fast.type() != libt::lazy_entry::dict_t) && !ec) return false; - out.addedTime = QDateTime::fromTime_t(fast.dict_find_int_value("qBt-addedTime")); out.savePath = Utils::Fs::fromNativePath(Utils::String::fromStdString(fast.dict_find_string_value("qBt-savePath"))); out.ratioLimit = Utils::String::fromStdString(fast.dict_find_string_value("qBt-ratioLimit")).toDouble(); out.label = Utils::String::fromStdString(fast.dict_find_string_value("qBt-label")); diff --git a/src/core/bittorrent/torrenthandle.cpp b/src/core/bittorrent/torrenthandle.cpp index 3179603bc..bc8747ed2 100644 --- a/src/core/bittorrent/torrenthandle.cpp +++ b/src/core/bittorrent/torrenthandle.cpp @@ -192,7 +192,6 @@ TorrentHandle::TorrentHandle(Session *session, const libtorrent::torrent_handle , m_state(TorrentState::Unknown) , m_renameCount(0) , m_name(data.name) - , m_addedTime(data.resumed ? data.addedTime : QDateTime::currentDateTime()) , m_savePath(Utils::Fs::toNativePath(data.savePath)) , m_label(data.label) , m_hasSeedStatus(data.resumed ? data.hasSeedStatus : false) @@ -500,7 +499,7 @@ QString TorrentHandle::label() const QDateTime TorrentHandle::addedTime() const { - return m_addedTime; + return QDateTime::fromTime_t(m_nativeStatus.added_time); } qreal TorrentHandle::ratioLimit() const @@ -1429,7 +1428,6 @@ void TorrentHandle::handleSaveResumeDataAlert(libtorrent::save_resume_data_alert resumeData["qBt-paused"] = isPaused(); resumeData["qBt-forced"] = isForced(); } - resumeData["qBt-addedTime"] = m_addedTime.toTime_t(); resumeData["qBt-savePath"] = Utils::String::toStdString(m_savePath); resumeData["qBt-ratioLimit"] = Utils::String::toStdString(QString::number(m_ratioLimit)); resumeData["qBt-label"] = Utils::String::toStdString(m_label); diff --git a/src/core/bittorrent/torrenthandle.h b/src/core/bittorrent/torrenthandle.h index 7548aee6e..5a18e8eb8 100644 --- a/src/core/bittorrent/torrenthandle.h +++ b/src/core/bittorrent/torrenthandle.h @@ -97,7 +97,6 @@ namespace BitTorrent // for new torrents QVector filePriorities; // for resumed torrents - QDateTime addedTime; qreal ratioLimit; AddTorrentData(); @@ -363,7 +362,6 @@ namespace BitTorrent // Persistent data QString m_name; - QDateTime m_addedTime; QString m_savePath; QString m_label; bool m_hasSeedStatus;