include files for Transmission
This commit is contained in:
1 parent
39190495be
commit
caded0694c
1 file changed
+6
-5
@@ -92,7 +92,7 @@ class Transmission(Downloader):
|
|||||||
statuses = StatusList(self)
|
statuses = StatusList(self)
|
||||||
|
|
||||||
return_params = {
|
return_params = {
|
||||||
'fields': ['id', 'name', 'hashString', 'percentDone', 'status', 'eta', 'isStalled', 'isFinished', 'downloadDir', 'uploadRatio', 'secondsSeeding', 'seedIdleLimit']
|
'fields': ['id', 'name', 'hashString', 'percentDone', 'status', 'eta', 'isStalled', 'isFinished', 'downloadDir', 'uploadRatio', 'secondsSeeding', 'seedIdleLimit', 'files']
|
||||||
}
|
}
|
||||||
|
|
||||||
queue = self.trpc.get_alltorrents(return_params)
|
queue = self.trpc.get_alltorrents(return_params)
|
||||||
@@ -104,9 +104,9 @@ class Transmission(Downloader):
|
|||||||
log.debug('name=%s / id=%s / downloadDir=%s / hashString=%s / percentDone=%s / status=%s / eta=%s / uploadRatio=%s / isFinished=%s',
|
log.debug('name=%s / id=%s / downloadDir=%s / hashString=%s / percentDone=%s / status=%s / eta=%s / uploadRatio=%s / isFinished=%s',
|
||||||
(item['name'], item['id'], item['downloadDir'], item['hashString'], item['percentDone'], item['status'], item['eta'], item['uploadRatio'], item['isFinished']))
|
(item['name'], item['id'], item['downloadDir'], item['hashString'], item['percentDone'], item['status'], item['eta'], item['uploadRatio'], item['isFinished']))
|
||||||
|
|
||||||
if not os.path.isdir(Env.setting('from', 'renamer')):
|
torrent_files = []
|
||||||
log.error('Renamer "from" folder doesn\'t to exist.')
|
for file_item in item['files']:
|
||||||
return
|
torrent_files.append(os.path.join(item['downloadDir'], file_item['name']))
|
||||||
|
|
||||||
status = 'busy'
|
status = 'busy'
|
||||||
if item['isStalled'] and self.conf('stalled_as_failed'):
|
if item['isStalled'] and self.conf('stalled_as_failed'):
|
||||||
@@ -123,7 +123,8 @@ class Transmission(Downloader):
|
|||||||
'original_status': item['status'],
|
'original_status': item['status'],
|
||||||
'seed_ratio': item['uploadRatio'],
|
'seed_ratio': item['uploadRatio'],
|
||||||
'timeleft': str(timedelta(seconds = item['eta'])),
|
'timeleft': str(timedelta(seconds = item['eta'])),
|
||||||
'folder': ss(os.path.join(item['downloadDir'], item['name'])),
|
'folder': ss(item['downloadDir']) if len(torrent_files) == 1 else ss(os.path.join(item['downloadDir'], item['name'])),
|
||||||
|
'files': ss('|'.join(torrent_files))
|
||||||
})
|
})
|
||||||
|
|
||||||
return statuses
|
return statuses
|
||||||
|
|||||||
Reference in new issue
Block a user