mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 19:44:52 +00:00
Last seen complete checks.
Remove some un-necessary `lt.version_minor` checks since these checks will remain for a while, at least until deluge depends on libtorrent >= 0.16 which should preferrably not happen.
This commit is contained in:
parent
110026edbe
commit
837c39fdda
2 changed files with 6 additions and 11 deletions
|
@ -188,12 +188,11 @@ class Torrent(object):
|
|||
else:
|
||||
self.owner = owner
|
||||
|
||||
# XXX: Remove when libtorrent 0.16 get's released???
|
||||
if lt.version_minor < 16:
|
||||
if state:
|
||||
self._last_seen_complete = state.last_seen_complete or 0.0
|
||||
else:
|
||||
self._last_seen_complete = 0.0
|
||||
# Keep trac of last seen complete
|
||||
if state:
|
||||
self._last_seen_complete = state.last_seen_complete or 0.0
|
||||
else:
|
||||
self._last_seen_complete = 0.0
|
||||
|
||||
# Keep track if we're forcing a recheck of the torrent so that we can
|
||||
# repause it after its done if necessary
|
||||
|
|
|
@ -636,7 +636,6 @@ class TorrentManager(component.Component):
|
|||
break
|
||||
|
||||
|
||||
# XXX: Remove when libtorrent 0.16 get's released???
|
||||
if lt.version_minor < 16:
|
||||
log.debug("libtorrent version is lower than 0.16. Start looping "
|
||||
"callback to calculate last_seen_complete info.")
|
||||
|
@ -681,13 +680,10 @@ class TorrentManager(component.Component):
|
|||
torrent.options["move_completed_path"],
|
||||
torrent.magnet,
|
||||
torrent.time_added,
|
||||
torrent.get_last_seen_complete(),
|
||||
torrent.owner,
|
||||
torrent.options["shared"]
|
||||
)
|
||||
# XXX: Remove when libtorrent 0.16 get's released???
|
||||
if lt.version_minor < 16:
|
||||
torrent_state.last_seen_complete = torrent._last_seen_complete
|
||||
|
||||
state.torrents.append(torrent_state)
|
||||
|
||||
# Pickle the TorrentManagerState object
|
||||
|
|
Loading…
Add table
Reference in a new issue