From f23b9d7cb979912b1176a582dc920b439dcb876b Mon Sep 17 00:00:00 2001 From: Ruud Date: Thu, 24 Jan 2013 22:56:33 +0100 Subject: [PATCH 1/7] Use host from config again. fix #1329 --- couchpotato/runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/runner.py b/couchpotato/runner.py index 97d15a55..2081d117 100644 --- a/couchpotato/runner.py +++ b/couchpotato/runner.py @@ -259,7 +259,7 @@ def runCouchPotato(options, base_path, args, data_dir = None, log_dir = None, En while try_restart: try: - server.listen(config['port']) + server.listen(config['port'], config['host']) loop.start() except Exception, e: try: From 7d3780133f6f1a20565be63f7282a40a6867d5ab Mon Sep 17 00:00:00 2001 From: Ruud Date: Thu, 24 Jan 2013 23:02:36 +0100 Subject: [PATCH 2/7] Missing download function. fix #1337 --- couchpotato/core/downloaders/base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/couchpotato/core/downloaders/base.py b/couchpotato/core/downloaders/base.py index 55a41838..70500dc0 100644 --- a/couchpotato/core/downloaders/base.py +++ b/couchpotato/core/downloaders/base.py @@ -57,6 +57,9 @@ class Downloader(Provider): return self.getAllDownloadStatus() + def getAllDownloadStatus(self): + return + def _removeFailed(self, item): if self.isDisabled(manual = True, data = {}): return From cb92b00534b5cdbffe40b159aada34ac6832b00e Mon Sep 17 00:00:00 2001 From: Ruud Date: Thu, 24 Jan 2013 23:33:48 +0100 Subject: [PATCH 3/7] Manage setting instead of getting folders. fix #1307 --- couchpotato/core/plugins/manage/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/core/plugins/manage/main.py b/couchpotato/core/plugins/manage/main.py index 9ef2a9c2..f80b80a8 100644 --- a/couchpotato/core/plugins/manage/main.py +++ b/couchpotato/core/plugins/manage/main.py @@ -198,7 +198,7 @@ class Manage(Plugin): def directories(self): try: - if self.conf('library', '').strip(): + if self.conf('library', default = '').strip(): return splitString(self.conf('library', default = ''), '::') except: pass From 9fe9ccf0ad1331b150e0169e15e49f6cc816bf8c Mon Sep 17 00:00:00 2001 From: Ruud Date: Thu, 24 Jan 2013 23:51:11 +0100 Subject: [PATCH 4/7] Open browser didn't work. --- couchpotato/core/_base/_core/main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/couchpotato/core/_base/_core/main.py b/couchpotato/core/_base/_core/main.py index c36c3fc5..ec421ac2 100644 --- a/couchpotato/core/_base/_core/main.py +++ b/couchpotato/core/_base/_core/main.py @@ -10,7 +10,6 @@ from uuid import uuid4 import os import platform import signal -import sys import time import traceback import webbrowser @@ -153,7 +152,7 @@ class Core(Plugin): def createBaseUrl(self): host = Env.setting('host') - if host == '0.0.0.0': + if host == '0.0.0.0' or host == '': host = 'localhost' port = Env.setting('port') From c6642ffeb7e99f4fdb3d0f4675c6f602ff0aeb76 Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 25 Jan 2013 12:57:41 +0100 Subject: [PATCH 5/7] Allow 1080p in brrip releases. fixes #1339 --- couchpotato/core/plugins/quality/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/core/plugins/quality/main.py b/couchpotato/core/plugins/quality/main.py index aeb74e58..4cd5b8de 100644 --- a/couchpotato/core/plugins/quality/main.py +++ b/couchpotato/core/plugins/quality/main.py @@ -21,7 +21,7 @@ class QualityPlugin(Plugin): {'identifier': 'bd50', 'hd': True, 'size': (15000, 60000), 'label': 'BR-Disk', 'alternative': ['bd25'], 'allow': ['1080p'], 'ext':[], 'tags': ['bdmv', 'certificate', ('complete', 'bluray')]}, {'identifier': '1080p', 'hd': True, 'size': (5000, 20000), 'label': '1080P', 'width': 1920, 'height': 1080, 'alternative': [], 'allow': [], 'ext':['mkv', 'm2ts'], 'tags': ['m2ts']}, {'identifier': '720p', 'hd': True, 'size': (3500, 10000), 'label': '720P', 'width': 1280, 'height': 720, 'alternative': [], 'allow': [], 'ext':['mkv', 'ts']}, - {'identifier': 'brrip', 'hd': True, 'size': (700, 7000), 'label': 'BR-Rip', 'alternative': ['bdrip'], 'allow': ['720p'], 'ext':['avi']}, + {'identifier': 'brrip', 'hd': True, 'size': (700, 7000), 'label': 'BR-Rip', 'alternative': ['bdrip'], 'allow': ['720p', '1080p'], 'ext':['avi']}, {'identifier': 'dvdr', 'size': (3000, 10000), 'label': 'DVD-R', 'alternative': [], 'allow': [], 'ext':['iso', 'img'], 'tags': ['pal', 'ntsc', 'video_ts', 'audio_ts']}, {'identifier': 'dvdrip', 'size': (600, 2400), 'label': 'DVD-Rip', 'width': 720, 'alternative': ['dvdrip'], 'allow': [], 'ext':['avi', 'mpg', 'mpeg'], 'tags': [('dvd', 'rip'), ('dvd', 'xvid'), ('dvd', 'divx')]}, {'identifier': 'scr', 'size': (600, 1600), 'label': 'Screener', 'alternative': ['screener', 'dvdscr', 'ppvrip'], 'allow': ['dvdr', 'dvd'], 'ext':['avi', 'mpg', 'mpeg']}, From 51364a3c257415bf517d1ad1de68359fa7a86153 Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 25 Jan 2013 13:12:10 +0100 Subject: [PATCH 6/7] Transmission params not set properly. fix #1344 --- couchpotato/core/downloaders/transmission/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/couchpotato/core/downloaders/transmission/main.py b/couchpotato/core/downloaders/transmission/main.py index d7354823..5c13af6e 100644 --- a/couchpotato/core/downloaders/transmission/main.py +++ b/couchpotato/core/downloaders/transmission/main.py @@ -38,6 +38,7 @@ class Transmission(Downloader): 'download-dir': folder_path } + torrent_params = {} if self.conf('ratio'): torrent_params = { 'seedRatioLimit': self.conf('ratio'), @@ -58,7 +59,8 @@ class Transmission(Downloader): remote_torrent = trpc.add_torrent_file(b64encode(filedata), arguments = params) # Change settings of added torrents - trpc.set_torrent(remote_torrent['torrent-added']['hashString'], torrent_params) + if torrent_params: + trpc.set_torrent(remote_torrent['torrent-added']['hashString'], torrent_params) return True except Exception, err: From 14fffda3ffd6b360cd1b9f9f7a5c278ef2b37ca7 Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 25 Jan 2013 15:26:06 +0100 Subject: [PATCH 7/7] Don't add signal handlers when daemonized. fix #1346 --- couchpotato/core/_base/_core/main.py | 1 + couchpotato/runner.py | 1 + 2 files changed, 2 insertions(+) diff --git a/couchpotato/core/_base/_core/main.py b/couchpotato/core/_base/_core/main.py index ec421ac2..0423e666 100644 --- a/couchpotato/core/_base/_core/main.py +++ b/couchpotato/core/_base/_core/main.py @@ -176,6 +176,7 @@ class Core(Plugin): }) def signalHandler(self): + if Env.get('daemonized'): return def signal_handler(signal, frame): fireEvent('app.shutdown') diff --git a/couchpotato/runner.py b/couchpotato/runner.py index 2081d117..37152582 100644 --- a/couchpotato/runner.py +++ b/couchpotato/runner.py @@ -118,6 +118,7 @@ def runCouchPotato(options, base_path, args, data_dir = None, log_dir = None, En Env.set('console_log', options.console_log) Env.set('quiet', options.quiet) Env.set('desktop', desktop) + Env.set('daemonized', options.daemon) Env.set('args', args) Env.set('options', options)