From 7b3645ea7ce9d6ff106a266405cdda31987d1395 Mon Sep 17 00:00:00 2001 From: mano3m Date: Tue, 17 Dec 2013 21:41:26 +0100 Subject: [PATCH] Don't consider stalled as failed when seeding Fixes the issue where Transmission is seeding but still considering the torrent stalled (new functionality of Transmission). CPS marks it as failed and a perfectly good torrent gets deleted. Several people on the forum have this issue, --- couchpotato/core/downloaders/transmission/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/couchpotato/core/downloaders/transmission/main.py b/couchpotato/core/downloaders/transmission/main.py index 46b5f3b..b8b1f9d 100644 --- a/couchpotato/core/downloaders/transmission/main.py +++ b/couchpotato/core/downloaders/transmission/main.py @@ -103,15 +103,15 @@ class Transmission(Downloader): for torrent in queue['torrents']: if torrent['hashString'] in ids: - log.debug('name=%s / id=%s / downloadDir=%s / hashString=%s / percentDone=%s / status=%s / eta=%s / uploadRatio=%s / isFinished=%s', - (torrent['name'], torrent['id'], torrent['downloadDir'], torrent['hashString'], torrent['percentDone'], torrent['status'], torrent['eta'], torrent['uploadRatio'], torrent['isFinished'])) + log.debug('name=%s / id=%s / downloadDir=%s / hashString=%s / percentDone=%s / status=%s / isStalled=%s / eta=%s / uploadRatio=%s / isFinished=%s', + (torrent['name'], torrent['id'], torrent['downloadDir'], torrent['hashString'], torrent['percentDone'], torrent['status'], torrent.get('isStalled', 'N/A'), torrent['eta'], torrent['uploadRatio'], torrent['isFinished'])) torrent_files = [] for file_item in torrent['files']: torrent_files.append(sp(os.path.join(torrent['downloadDir'], file_item['name']))) status = 'busy' - if torrent.get('isStalled') and self.conf('stalled_as_failed'): + if torrent.get('isStalled') and not torrent['percentDone'] == 1 and self.conf('stalled_as_failed'): status = 'failed' elif torrent['status'] == 0 and torrent['percentDone'] == 1: status = 'completed'