mirror of
https://github.com/correl/Transmission-XBMC.git
synced 2024-11-21 19:18:41 +00:00
Corrected broken variable references in updateTorrents
This commit is contained in:
parent
1ae11d5329
commit
0ccb403e83
1 changed files with 3 additions and 3 deletions
|
@ -74,7 +74,7 @@ class TransmissionGUI(xbmcgui.WindowXMLDialog):
|
|||
def updateTorrents(self):
|
||||
list = self.getControl(120)
|
||||
self.torrents = self.transmission.info()
|
||||
for i, torrent in torrents.iteritems():
|
||||
for i, torrent in self.torrents.iteritems():
|
||||
statusline = "[%(status)s] %(down)s down (%(pct).2f%%), %(up)s up (Ratio: %(ratio).2f)" % \
|
||||
{'down': Bytes.format(torrent.downloadedEver), 'pct': torrent.progress, \
|
||||
'up': Bytes.format(torrent.uploadedEver), 'ratio': torrent.ratio, \
|
||||
|
@ -95,7 +95,7 @@ class TransmissionGUI(xbmcgui.WindowXMLDialog):
|
|||
l.setInfo('torrent', torrent.fields)
|
||||
l.setInfo('video', {'episode': int(torrent.progress)})
|
||||
|
||||
removed = [id for id in self.list.keys() if id not in torrents.keys()]
|
||||
removed = [id for id in self.list.keys() if id not in self.torrents.keys()]
|
||||
if len(removed) > 0:
|
||||
# Clear torrents from the list that have been removed
|
||||
for id in removed:
|
||||
|
@ -103,7 +103,7 @@ class TransmissionGUI(xbmcgui.WindowXMLDialog):
|
|||
list.reset()
|
||||
for id, item in self.list.iteritems():
|
||||
list.addItem(item)
|
||||
list.setEnabled(bool(torrents))
|
||||
list.setEnabled(bool(self.torrents))
|
||||
|
||||
# Update again, after an interval
|
||||
self.timer = threading.Timer(UPDATE_INTERVAL, self.updateTorrents)
|
||||
|
|
Loading…
Reference in a new issue