r175 - in /debtorrent/trunk: DebTorrent/download_bt1.py debtorrent-client.py
camrdale-guest at users.alioth.debian.org
camrdale-guest at users.alioth.debian.org
Mon Jul 16 16:14:06 UTC 2007
Author: camrdale-guest
Date: Mon Jul 16 16:14:06 2007
New Revision: 175
URL: http://svn.debian.org/wsvn/debtorrent/?sc=1&rev=175
Log:
Remove the priority option.
Modified:
debtorrent/trunk/DebTorrent/download_bt1.py
debtorrent/trunk/debtorrent-client.py
Modified: debtorrent/trunk/DebTorrent/download_bt1.py
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/trunk/DebTorrent/download_bt1.py?rev=175&op=diff
==============================================================================
--- debtorrent/trunk/DebTorrent/download_bt1.py (original)
+++ debtorrent/trunk/DebTorrent/download_bt1.py Mon Jul 16 16:14:06 2007
@@ -62,9 +62,6 @@
('configfile', '', 'the configuration file to use, if not specified then ' +
'a file in /etc/debtorrent will be used, followed by ' +
'a file in the .DebTorrent directory in the user\'s home directory'),
- ('priority', '',
- 'a list of file priorities separated by commas, must be one per file, ' +
- '0 = highest, 1 = normal, 2 = lowest, -1 = download disabled'),
# Locations
('download_dir', '',
'directory to save the download in, blank indicates use the user\'s ' +
@@ -533,8 +530,6 @@
@ivar files: the full file names and lengths of all the files in the download
@type datalength: C{long}
@ivar datalength: the total length of the download
- @type priority: C{list}
- @ivar priority: the priorities to download the files at
@type storage: L{BT1.Storage.Storage}
@ivar storage: the file storage instance
@type upmeasure: L{CurrentRateMeasure.Measure}
@@ -832,29 +827,13 @@
statusfunc = self.statusfunc
disabled_files = None
- self.priority = self.config['priority']
- if self.priority:
- try:
- self.priority = self.priority.split(',')
- assert len(self.priority) == len(self.files)
- self.priority = [int(p) for p in self.priority]
- for p in self.priority:
- assert p >= -1
- assert p <= 2
- except:
- self.errorfunc('bad priority list given, ignored')
- self.priority = None
-
data = self.appdataobj.getTorrentData(self.infohash)
try:
d = data['resume data']['priority']
assert len(d) == len(self.files)
disabled_files = [x == -1 for x in d]
except:
- try:
- disabled_files = [x == -1 for x in self.priority]
- except:
- pass
+ pass
try:
try:
@@ -889,9 +868,6 @@
if data:
self.fileselector.unpickle(data)
- if self.priority:
- self.fileselector.initialize_priorities_now(self.priority)
-
self.checking = True
if old_style:
return self.storagewrapper.old_style_init()
@@ -1091,8 +1067,7 @@
self.fileselector.tie_in(self._cancelfunc, self._reqmorefunc,
self.rerequest_ondownloadmore)
- if self.priority:
- self.fileselector.set_priorities_now(self.priority)
+
self.appdataobj.deleteTorrentData(self.infohash)
# erase old data once you've started modifying it
Modified: debtorrent/trunk/debtorrent-client.py
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/trunk/debtorrent-client.py?rev=175&op=diff
==============================================================================
--- debtorrent/trunk/debtorrent-client.py (original)
+++ debtorrent/trunk/debtorrent-client.py Mon Jul 16 16:14:06 2007
@@ -44,7 +44,7 @@
configdefaults = {}
try:
configdir = ConfigDir('debtorrent-client')
- defaultsToIgnore = ['configfile', 'priority']
+ defaultsToIgnore = ['configfile']
configdir.setDefaults(defaults,defaultsToIgnore)
configdefaults = configdir.loadConfig(params)
defaults.append(('save_options',0,
More information about the Debtorrent-commits
mailing list