diff --git a/couchpotato/core/_base/_core/main.py b/couchpotato/core/_base/_core/main.py index c36c3fc5f91dd103db4143ef23458f92956cbdbd..0423e6666803e77e25625d3fec2ec7f81c9975b8 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') @@ -177,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/core/downloaders/base.py b/couchpotato/core/downloaders/base.py index 55a41838a8289dd288c5f2e202d9b65e7f4bd2ab..70500dc09d4dcc77581a7d58ccf179f1e95f28ce 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 diff --git a/couchpotato/core/downloaders/transmission/main.py b/couchpotato/core/downloaders/transmission/main.py index d7354823e6888ed21421422b4927adea0e95e6b1..5c13af6e1c8f131c47061dab1b8b25988f563e9d 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: diff --git a/couchpotato/core/plugins/manage/main.py b/couchpotato/core/plugins/manage/main.py index 9ef2a9c2316137b0e4ca978b331a152109f4d199..f80b80a8baf000d3e86a28997218302183b0303c 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 diff --git a/couchpotato/core/plugins/quality/main.py b/couchpotato/core/plugins/quality/main.py index aeb74e5837e860fe3fa6eda062bf9b65e0afdb61..4cd5b8de6869d363206c95349e5f24e181b27398 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']}, diff --git a/couchpotato/runner.py b/couchpotato/runner.py index 97d15a5506f4f7784b3a0f33f24aae985746fae6..371525829c34349b1d21aff9f42f177ec109cdf1 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) @@ -259,7 +260,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: