diff --git a/headphones.py b/headphones.py index 2dd37c2f..3d37d187 100755 --- a/headphones.py +++ b/headphones.py @@ -70,6 +70,7 @@ def serverstart(): {settings['http_username']:settings['http_password']}) }) + if options.daemonize: Daemonizer(cherrypy.engine).subscribe() diff --git a/searcher.py b/searcher.py index 9a157d2f..b8f37b09 100644 --- a/searcher.py +++ b/searcher.py @@ -97,8 +97,4 @@ def searchNZB(albumid=None): conn.commit() c.close() - - - - \ No newline at end of file diff --git a/threadtools.py b/threadtools.py index 44106e43..7c74c3e3 100644 --- a/threadtools.py +++ b/threadtools.py @@ -18,16 +18,15 @@ class threadtool(SimplePlugin): self.thread = threading.Thread(target=self.run) self.thread.start() self.sched.start() + start.priority = 80 def stop(self): self.running = False - print '''Shutting down''' - if self.thread: self.thread.join() self.thread = None - self.running = False self.sched.shutdown() + stop.priority = 10 def run(self): import updater