mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
Replace internal time_added with lt added_time
This commit is contained in:
parent
246708e222
commit
b5946c91ed
2 changed files with 2 additions and 11 deletions
|
@ -35,7 +35,6 @@
|
||||||
"""Internal Torrent class"""
|
"""Internal Torrent class"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import time
|
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
from urllib import unquote
|
from urllib import unquote
|
||||||
|
@ -199,11 +198,6 @@ class Torrent(object):
|
||||||
# This gets updated when get_tracker_host is called
|
# This gets updated when get_tracker_host is called
|
||||||
self.tracker_host = None
|
self.tracker_host = None
|
||||||
|
|
||||||
if state:
|
|
||||||
self.time_added = state.time_added
|
|
||||||
else:
|
|
||||||
self.time_added = time.time()
|
|
||||||
|
|
||||||
# Keep track of the owner
|
# Keep track of the owner
|
||||||
if state:
|
if state:
|
||||||
self.owner = state.owner
|
self.owner = state.owner
|
||||||
|
@ -249,7 +243,7 @@ class Torrent(object):
|
||||||
del OPTIONS_FUNCS["prioritize_first_last_pieces"]
|
del OPTIONS_FUNCS["prioritize_first_last_pieces"]
|
||||||
|
|
||||||
for (key, value) in options.items():
|
for (key, value) in options.items():
|
||||||
if OPTIONS_FUNCS.has_key(key):
|
if key in OPTIONS_FUNCS:
|
||||||
OPTIONS_FUNCS[key](value)
|
OPTIONS_FUNCS[key](value)
|
||||||
self.options.update(options)
|
self.options.update(options)
|
||||||
|
|
||||||
|
@ -724,7 +718,7 @@ class Torrent(object):
|
||||||
"state": lambda: self.state,
|
"state": lambda: self.state,
|
||||||
"stop_at_ratio": lambda: self.options["stop_at_ratio"],
|
"stop_at_ratio": lambda: self.options["stop_at_ratio"],
|
||||||
"stop_ratio": lambda: self.options["stop_ratio"],
|
"stop_ratio": lambda: self.options["stop_ratio"],
|
||||||
"time_added": lambda: self.time_added,
|
"time_added": lambda: self.status.added_time,
|
||||||
"total_done": lambda: self.status.total_done,
|
"total_done": lambda: self.status.total_done,
|
||||||
"total_payload_download": lambda: self.status.total_payload_download,
|
"total_payload_download": lambda: self.status.total_payload_download,
|
||||||
"total_payload_upload": lambda: self.status.total_payload_upload,
|
"total_payload_upload": lambda: self.status.total_payload_upload,
|
||||||
|
|
|
@ -86,7 +86,6 @@ class TorrentState:
|
||||||
move_completed=False,
|
move_completed=False,
|
||||||
move_completed_path=None,
|
move_completed_path=None,
|
||||||
magnet=None,
|
magnet=None,
|
||||||
time_added=-1,
|
|
||||||
owner=None,
|
owner=None,
|
||||||
shared=False,
|
shared=False,
|
||||||
super_seeding=False
|
super_seeding=False
|
||||||
|
@ -97,7 +96,6 @@ class TorrentState:
|
||||||
self.queue = queue
|
self.queue = queue
|
||||||
self.is_finished = is_finished
|
self.is_finished = is_finished
|
||||||
self.magnet = magnet
|
self.magnet = magnet
|
||||||
self.time_added = time_added
|
|
||||||
self.owner = owner
|
self.owner = owner
|
||||||
|
|
||||||
# Options
|
# Options
|
||||||
|
@ -693,7 +691,6 @@ class TorrentManager(component.Component):
|
||||||
torrent.options["move_completed"],
|
torrent.options["move_completed"],
|
||||||
torrent.options["move_completed_path"],
|
torrent.options["move_completed_path"],
|
||||||
torrent.magnet,
|
torrent.magnet,
|
||||||
torrent.time_added,
|
|
||||||
torrent.owner,
|
torrent.owner,
|
||||||
torrent.options["shared"],
|
torrent.options["shared"],
|
||||||
torrent.options["super_seeding"]
|
torrent.options["super_seeding"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue