Browse Source

Simplify code

adaptive-webui-19844
Chocobo1 5 years ago
parent
commit
fba72f5fb7
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 6
      src/webui/api/serialize/serialize_torrent.cpp

6
src/webui/api/serialize/serialize_torrent.cpp

@ -136,9 +136,9 @@ QVariantMap serialize(const BitTorrent::TorrentHandle &torrent) @@ -136,9 +136,9 @@ QVariantMap serialize(const BitTorrent::TorrentHandle &torrent)
ret[KEY_TORRENT_LAST_ACTIVITY_TIME] = 0;
}
else {
QDateTime dt = QDateTime::currentDateTime();
dt = dt.addSecs(-torrent.timeSinceActivity());
ret[KEY_TORRENT_LAST_ACTIVITY_TIME] = dt.toSecsSinceEpoch();
const qint64 dt = (QDateTime::currentDateTime().toSecsSinceEpoch()
- torrent.timeSinceActivity());
ret[KEY_TORRENT_LAST_ACTIVITY_TIME] = dt;
}
return ret;

Loading…
Cancel
Save