mirror of
https://github.com/correl/Transmission-XBMC.git
synced 2024-11-24 11:09:58 +00:00
Show the percentage next to the progress bar in the details window
This commit is contained in:
parent
50e9e2f286
commit
25d418d9f5
2 changed files with 11 additions and 2 deletions
|
@ -210,10 +210,11 @@ class TorrentInfoGUI(xbmcgui.WindowXMLDialog):
|
|||
list = self.getControl(220)
|
||||
labelName = self.getControl(1)
|
||||
labelStatus = self.getControl(2)
|
||||
labelProgress = self.getControl(11)
|
||||
torrent = self.transmission.info()[self.torrent_id]
|
||||
files = self.transmission.get_files(self.torrent_id)[self.torrent_id]
|
||||
|
||||
statusline = "[%(status)s] %(down)s down (%(pct).2f%%), %(up)s up (Ratio: %(ratio).2f)" % \
|
||||
statusline = "[%(status)s] %(down)s down, %(up)s up (Ratio: %(ratio).2f)" % \
|
||||
{'down': Bytes.format(torrent.downloadedEver), 'pct': torrent.progress, \
|
||||
'up': Bytes.format(torrent.uploadedEver), 'ratio': torrent.ratio, \
|
||||
'status': torrent.status}
|
||||
|
@ -223,6 +224,7 @@ class TorrentInfoGUI(xbmcgui.WindowXMLDialog):
|
|||
|
||||
labelName.setLabel(torrent.name)
|
||||
labelStatus.setLabel(statusline)
|
||||
labelProgress.setLabel('%3d%%' % (torrent.progress))
|
||||
pbar.setPercent(torrent.progress)
|
||||
|
||||
for i, file in files.iteritems():
|
||||
|
|
|
@ -63,10 +63,17 @@
|
|||
<description>Torrent progress</description>
|
||||
<posx>20</posx>
|
||||
<posy>70</posy>
|
||||
<width>890</width>
|
||||
<width>830</width>
|
||||
<height>30</height>
|
||||
<visible>true</visible>
|
||||
</control>
|
||||
<control type="label" id="11">
|
||||
<posx>855</posx>
|
||||
<posy>69</posy>
|
||||
<width>70</width>
|
||||
<height>30</height>
|
||||
<label></label>
|
||||
</control>
|
||||
</control>
|
||||
<control type="list" id="220">
|
||||
<description>File list</description>
|
||||
|
|
Loading…
Reference in a new issue