From 54ea22e9b6d1c8b70a4f89f47bf21bb1100683c4 Mon Sep 17 00:00:00 2001 From: Ruud Date: Tue, 22 Jan 2013 22:02:23 +0100 Subject: [PATCH 01/14] Only remove available status releases when refreshing --- couchpotato/core/plugins/searcher/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/core/plugins/searcher/main.py b/couchpotato/core/plugins/searcher/main.py index eb953cd1..8c1929af 100644 --- a/couchpotato/core/plugins/searcher/main.py +++ b/couchpotato/core/plugins/searcher/main.py @@ -251,7 +251,7 @@ class Searcher(Plugin): # Remove releases that aren't found anymore for release in movie.get('releases', []): - if release.get('identifier') not in found_releases: + if release.get('status_id') == available_status.get('id') and release.get('identifier') not in found_releases: fireEvent('release.delete', release.get('id'), single = True) else: From 9d633910f60a31b7868e5d6d2bce739bf28f3e58 Mon Sep 17 00:00:00 2001 From: Ruud Date: Tue, 22 Jan 2013 22:35:44 +0100 Subject: [PATCH 02/14] NZBsRus fixes --- couchpotato/core/providers/nzb/nzbsrus/__init__.py | 2 +- couchpotato/core/providers/nzb/nzbsrus/main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/providers/nzb/nzbsrus/__init__.py b/couchpotato/core/providers/nzb/nzbsrus/__init__.py index 5c4586d7..3a042784 100644 --- a/couchpotato/core/providers/nzb/nzbsrus/__init__.py +++ b/couchpotato/core/providers/nzb/nzbsrus/__init__.py @@ -12,7 +12,7 @@ config = [{ 'list': 'nzb_providers', 'name': 'nzbsrus', 'label': 'Nzbsrus', - 'description': 'See NZBsRus', + 'description': 'See NZBsRus. You need a VIP account!', 'wizard': True, 'options': [ { diff --git a/couchpotato/core/providers/nzb/nzbsrus/main.py b/couchpotato/core/providers/nzb/nzbsrus/main.py index f6a16aaa..d52212a7 100644 --- a/couchpotato/core/providers/nzb/nzbsrus/main.py +++ b/couchpotato/core/providers/nzb/nzbsrus/main.py @@ -53,7 +53,7 @@ class Nzbsrus(NZBProvider, RSS): 'name': title, 'age': age, 'size': size, - 'url': self.urls['download'] % id + self.getApiExt() + self.getTextElement(nzb, 'key'), + 'url': self.urls['download'] % nzb_id + self.getApiExt() + self.getTextElement(nzb, 'key'), 'detail_url': self.urls['detail'] % nzb_id, 'description': self.getTextElement(nzb, 'addtext'), }) From 1a89d551dc1ae0cbab09d841470269777633e2f4 Mon Sep 17 00:00:00 2001 From: Ruud Date: Tue, 22 Jan 2013 22:41:17 +0100 Subject: [PATCH 03/14] Contribute update --- contributing.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contributing.md b/contributing.md index 5bb77037..572dd332 100644 --- a/contributing.md +++ b/contributing.md @@ -5,9 +5,10 @@ * Search through the existing (and closed) issues first. See if you can get your answer there. * Double check the result manually, because it could be an external issue. * Post logs! Without seeing what is going on, I can't reproduce the error. - * What are you settings for the specific problem - * What providers are you using. (While your logs include these, scanning through hundred of lines of log isn't my hobby) - * Give me a short step by step of how to reproduce + * What is the movie + quality you are searching for. + * What are you settings for the specific problem. + * What providers are you using. (While your logs include these, scanning through hundred of lines of log isn't my hobby). + * Give me a short step by step of how to reproduce. * What hardware / OS are you using and what are the limits? NAS can be slow and maybe have a different python installed then when you use CP on OSX or Windows for example. * I will mark issues with the "can't reproduce" tag. Don't go asking me "why closed" if it clearly says the issue in the tag ;) From 8ed2a998303d440984beb509a8da2c8e191a182c Mon Sep 17 00:00:00 2001 From: Ruud Date: Tue, 22 Jan 2013 22:55:06 +0100 Subject: [PATCH 04/14] Don't try to parse None on IMDB watchlist --- couchpotato/core/plugins/automation/main.py | 2 +- couchpotato/core/providers/automation/imdb/main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/plugins/automation/main.py b/couchpotato/core/plugins/automation/main.py index c216688c..f4ede40d 100644 --- a/couchpotato/core/plugins/automation/main.py +++ b/couchpotato/core/plugins/automation/main.py @@ -12,7 +12,7 @@ class Automation(Plugin): fireEvent('schedule.interval', 'automation.add_movies', self.addMovies, hours = self.conf('hour', default = 12)) - if Env.get('dev'): + if not Env.get('dev'): addEvent('app.load', self.addMovies) def addMovies(self): diff --git a/couchpotato/core/providers/automation/imdb/main.py b/couchpotato/core/providers/automation/imdb/main.py index 428a8b2b..75a2d75c 100644 --- a/couchpotato/core/providers/automation/imdb/main.py +++ b/couchpotato/core/providers/automation/imdb/main.py @@ -27,7 +27,7 @@ class IMDB(Automation, RSS): try: rss_data = self.getHTMLData(url) - imdbs = getImdb(rss_data, multiple = True) + imdbs = getImdb(rss_data, multiple = True) if rss_data else [] for imdb in imdbs: movies.append(imdb) From 5f428649c362510ddf0e063841e02c2e1a5742c4 Mon Sep 17 00:00:00 2001 From: Ruud Date: Tue, 22 Jan 2013 23:20:55 +0100 Subject: [PATCH 05/14] Writing larger files fails on Windows. fix #1281 --- couchpotato/core/plugins/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/core/plugins/base.py b/couchpotato/core/plugins/base.py index a3d5628a..73a2c306 100644 --- a/couchpotato/core/plugins/base.py +++ b/couchpotato/core/plugins/base.py @@ -78,7 +78,7 @@ class Plugin(object): self.makeDir(os.path.dirname(path)) try: - f = open(path, 'w' if not binary else 'wb') + f = open(path, 'w+' if not binary else 'w+b') f.write(content) f.close() os.chmod(path, Env.getPermission('file')) From 89c38f5aa45feaf3c4666292b1adfdee8fc7b1dd Mon Sep 17 00:00:00 2001 From: Ruud Date: Tue, 22 Jan 2013 23:24:09 +0100 Subject: [PATCH 06/14] Use host from config again. fix #1278 --- couchpotato/runner.py | 1 + 1 file changed, 1 insertion(+) diff --git a/couchpotato/runner.py b/couchpotato/runner.py index d3a49f02..7062c75b 100644 --- a/couchpotato/runner.py +++ b/couchpotato/runner.py @@ -212,6 +212,7 @@ def runCouchPotato(options, base_path, args, data_dir = None, log_dir = None, En config = { 'use_reloader': reloader, 'port': tryInt(Env.setting('port', default = 5000)), + 'host': Env.setting('host', default = ''), 'ssl_cert': Env.setting('ssl_cert', default = None), 'ssl_key': Env.setting('ssl_key', default = None), } From 7cc55c21b62a6195892072b4e6594db3df2d7d2f Mon Sep 17 00:00:00 2001 From: Ruud Date: Tue, 22 Jan 2013 23:43:15 +0100 Subject: [PATCH 07/14] Shutdown cleanly on quit process --- CouchPotato.py | 3 +-- couchpotato/core/_base/_core/main.py | 4 +++- couchpotato/core/_base/scheduler/main.py | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CouchPotato.py b/CouchPotato.py index c36757fc..e777f9bf 100755 --- a/CouchPotato.py +++ b/CouchPotato.py @@ -62,7 +62,6 @@ class Loader(object): self.log.logger.addHandler(hdlr) def addSignals(self): - signal.signal(signal.SIGINT, self.onExit) signal.signal(signal.SIGTERM, lambda signum, stack_frame: sys.exit(1)) @@ -74,7 +73,7 @@ class Loader(object): def onExit(self, signal, frame): from couchpotato.core.event import fireEvent - fireEvent('app.crappy_shutdown', single = True) + fireEvent('app.shutdown', single = True) def run(self): diff --git a/couchpotato/core/_base/_core/main.py b/couchpotato/core/_base/_core/main.py index c5ce39ad..c36c3fc5 100644 --- a/couchpotato/core/_base/_core/main.py +++ b/couchpotato/core/_base/_core/main.py @@ -10,6 +10,7 @@ from uuid import uuid4 import os import platform import signal +import sys import time import traceback import webbrowser @@ -178,6 +179,7 @@ class Core(Plugin): def signalHandler(self): def signal_handler(signal, frame): - fireEvent('app.do_shutdown') + fireEvent('app.shutdown') signal.signal(signal.SIGINT, signal_handler) + signal.signal(signal.SIGTERM, signal_handler) diff --git a/couchpotato/core/_base/scheduler/main.py b/couchpotato/core/_base/scheduler/main.py index d442722d..4102552e 100644 --- a/couchpotato/core/_base/scheduler/main.py +++ b/couchpotato/core/_base/scheduler/main.py @@ -2,7 +2,6 @@ from apscheduler.scheduler import Scheduler as Sched from couchpotato.core.event import addEvent from couchpotato.core.logger import CPLog from couchpotato.core.plugins.base import Plugin -import logging log = CPLog(__name__) From 647159e54943d13816e611c9e974af6bce4579c6 Mon Sep 17 00:00:00 2001 From: Ruud Date: Wed, 23 Jan 2013 22:16:04 +0100 Subject: [PATCH 08/14] Fix and cleanup wizard. fix #1324 --- couchpotato/core/plugins/wizard/static/wizard.css | 7 ++++++- couchpotato/core/plugins/wizard/static/wizard.js | 5 +---- couchpotato/core/providers/nzb/__init__.py | 1 + couchpotato/core/providers/nzb/binsearch/__init__.py | 1 + couchpotato/core/providers/nzb/ftdworld/__init__.py | 1 + couchpotato/core/providers/nzb/nzbclub/__init__.py | 1 + couchpotato/core/providers/nzb/nzbindex/__init__.py | 1 + couchpotato/core/providers/nzb/nzbx/__init__.py | 1 + couchpotato/core/providers/nzb/omgwtfnzbs/__init__.py | 1 + couchpotato/core/providers/torrent/__init__.py | 1 + .../core/providers/torrent/passthepopcorn/__init__.py | 1 + couchpotato/core/providers/torrent/publichd/__init__.py | 1 + couchpotato/core/providers/torrent/sceneaccess/__init__.py | 1 + couchpotato/core/providers/torrent/scenehd/__init__.py | 1 + couchpotato/core/providers/torrent/torrentday/__init__.py | 1 + .../core/providers/torrent/torrentleech/__init__.py | 1 + couchpotato/static/scripts/page/settings.js | 2 +- couchpotato/static/style/page/settings.css | 1 + 18 files changed, 23 insertions(+), 6 deletions(-) diff --git a/couchpotato/core/plugins/wizard/static/wizard.css b/couchpotato/core/plugins/wizard/static/wizard.css index a24f2b9e..8d50d9de 100644 --- a/couchpotato/core/plugins/wizard/static/wizard.css +++ b/couchpotato/core/plugins/wizard/static/wizard.css @@ -1,8 +1,13 @@ +.page.wizard .uniForm { + width: 80%; + margin: 0 auto 30px; +} + .page.wizard h1 { padding: 10px 30px; margin: 0; display: block; - font-size: 40px; + font-size: 30px; margin-top: 80px; } diff --git a/couchpotato/core/plugins/wizard/static/wizard.js b/couchpotato/core/plugins/wizard/static/wizard.js index fd6eb14b..eb41cb59 100644 --- a/couchpotato/core/plugins/wizard/static/wizard.js +++ b/couchpotato/core/plugins/wizard/static/wizard.js @@ -41,8 +41,7 @@ Page.Wizard = new Class({ }, 'providers': { 'title': 'Are you registered at any of these sites?', - 'description': 'CP uses these sites to search for movies. A few free are enabled by default, but it\'s always better to have a few more. Check settings for the full list of available providers.', - 'include': ['nzb_providers', 'torrent_providers'] + 'description': 'CP uses these sites to search for movies. A few free are enabled by default, but it\'s always better to have a few more. Check settings for the full list of available providers.' }, 'renamer': { 'title': 'Move & rename the movies after downloading?', @@ -213,8 +212,6 @@ Page.Wizard = new Class({ // Hide retention self.el.getElement('.tab_searcher').hide(); self.el.getElement('.t_searcher').hide(); - self.el.getElement('.t_nzb_providers').hide(); - self.el.getElement('.t_torrent_providers').hide(); // Add pointer new Element('.tab_wrapper').wraps(tabs).adopt( diff --git a/couchpotato/core/providers/nzb/__init__.py b/couchpotato/core/providers/nzb/__init__.py index a704a94e..651ae8b9 100644 --- a/couchpotato/core/providers/nzb/__init__.py +++ b/couchpotato/core/providers/nzb/__init__.py @@ -4,6 +4,7 @@ config = { { 'label': 'Usenet', 'description': 'Providers searching usenet for new releases', + 'wizard': True, 'type': 'list', 'name': 'nzb_providers', 'tab': 'searcher', diff --git a/couchpotato/core/providers/nzb/binsearch/__init__.py b/couchpotato/core/providers/nzb/binsearch/__init__.py index bf45f668..f4288b11 100644 --- a/couchpotato/core/providers/nzb/binsearch/__init__.py +++ b/couchpotato/core/providers/nzb/binsearch/__init__.py @@ -12,6 +12,7 @@ config = [{ 'list': 'nzb_providers', 'name': 'binsearch', 'description': 'Free provider, less accurate. See BinSearch', + 'wizard': True, 'options': [ { 'name': 'enabled', diff --git a/couchpotato/core/providers/nzb/ftdworld/__init__.py b/couchpotato/core/providers/nzb/ftdworld/__init__.py index 76985648..ca60ac4d 100644 --- a/couchpotato/core/providers/nzb/ftdworld/__init__.py +++ b/couchpotato/core/providers/nzb/ftdworld/__init__.py @@ -12,6 +12,7 @@ config = [{ 'list': 'nzb_providers', 'name': 'FTDWorld', 'description': 'Free provider, less accurate. See FTDWorld', + 'wizard': True, 'options': [ { 'name': 'enabled', diff --git a/couchpotato/core/providers/nzb/nzbclub/__init__.py b/couchpotato/core/providers/nzb/nzbclub/__init__.py index 310f4b09..7859fe9c 100644 --- a/couchpotato/core/providers/nzb/nzbclub/__init__.py +++ b/couchpotato/core/providers/nzb/nzbclub/__init__.py @@ -12,6 +12,7 @@ config = [{ 'list': 'nzb_providers', 'name': 'NZBClub', 'description': 'Free provider, less accurate. See NZBClub', + 'wizard': True, 'options': [ { 'name': 'enabled', diff --git a/couchpotato/core/providers/nzb/nzbindex/__init__.py b/couchpotato/core/providers/nzb/nzbindex/__init__.py index bad0557d..29eb0d38 100644 --- a/couchpotato/core/providers/nzb/nzbindex/__init__.py +++ b/couchpotato/core/providers/nzb/nzbindex/__init__.py @@ -12,6 +12,7 @@ config = [{ 'list': 'nzb_providers', 'name': 'nzbindex', 'description': 'Free provider, less accurate. See NZBIndex', + 'wizard': True, 'options': [ { 'name': 'enabled', diff --git a/couchpotato/core/providers/nzb/nzbx/__init__.py b/couchpotato/core/providers/nzb/nzbx/__init__.py index 2063a5e8..9ce9226b 100644 --- a/couchpotato/core/providers/nzb/nzbx/__init__.py +++ b/couchpotato/core/providers/nzb/nzbx/__init__.py @@ -12,6 +12,7 @@ config = [{ 'list': 'nzb_providers', 'name': 'nzbX', 'description': 'Free provider. See nzbX', + 'wizard': True, 'options': [ { 'name': 'enabled', diff --git a/couchpotato/core/providers/nzb/omgwtfnzbs/__init__.py b/couchpotato/core/providers/nzb/omgwtfnzbs/__init__.py index 74fee0a8..287ced49 100644 --- a/couchpotato/core/providers/nzb/omgwtfnzbs/__init__.py +++ b/couchpotato/core/providers/nzb/omgwtfnzbs/__init__.py @@ -12,6 +12,7 @@ config = [{ 'list': 'nzb_providers', 'name': 'OMGWTFNZBs', 'description': 'See OMGWTFNZBs', + 'wizard': True, 'options': [ { 'name': 'enabled', diff --git a/couchpotato/core/providers/torrent/__init__.py b/couchpotato/core/providers/torrent/__init__.py index df6cd9ad..191e132e 100644 --- a/couchpotato/core/providers/torrent/__init__.py +++ b/couchpotato/core/providers/torrent/__init__.py @@ -4,6 +4,7 @@ config = { { 'label': 'Torrent', 'description': 'Providers searching torrent sites for new releases', + 'wizard': True, 'type': 'list', 'name': 'torrent_providers', 'tab': 'searcher', diff --git a/couchpotato/core/providers/torrent/passthepopcorn/__init__.py b/couchpotato/core/providers/torrent/passthepopcorn/__init__.py index ce9d3822..06be7a89 100644 --- a/couchpotato/core/providers/torrent/passthepopcorn/__init__.py +++ b/couchpotato/core/providers/torrent/passthepopcorn/__init__.py @@ -12,6 +12,7 @@ config = [{ 'list': 'torrent_providers', 'name': 'PassThePopcorn', 'description': 'See PassThePopcorn.me', + 'wizard': True, 'options': [ { 'name': 'enabled', diff --git a/couchpotato/core/providers/torrent/publichd/__init__.py b/couchpotato/core/providers/torrent/publichd/__init__.py index 06be3354..2c356e20 100644 --- a/couchpotato/core/providers/torrent/publichd/__init__.py +++ b/couchpotato/core/providers/torrent/publichd/__init__.py @@ -12,6 +12,7 @@ config = [{ 'list': 'torrent_providers', 'name': 'PublicHD', 'description': 'Public Torrent site with only HD content. See PublicHD', + 'wizard': True, 'options': [ { 'name': 'enabled', diff --git a/couchpotato/core/providers/torrent/sceneaccess/__init__.py b/couchpotato/core/providers/torrent/sceneaccess/__init__.py index 13614820..e12bf8bd 100644 --- a/couchpotato/core/providers/torrent/sceneaccess/__init__.py +++ b/couchpotato/core/providers/torrent/sceneaccess/__init__.py @@ -12,6 +12,7 @@ config = [{ 'list': 'torrent_providers', 'name': 'SceneAccess', 'description': 'See SceneAccess', + 'wizard': True, 'options': [ { 'name': 'enabled', diff --git a/couchpotato/core/providers/torrent/scenehd/__init__.py b/couchpotato/core/providers/torrent/scenehd/__init__.py index 032e7055..10c5e385 100644 --- a/couchpotato/core/providers/torrent/scenehd/__init__.py +++ b/couchpotato/core/providers/torrent/scenehd/__init__.py @@ -12,6 +12,7 @@ config = [{ 'list': 'torrent_providers', 'name': 'SceneHD', 'description': 'See SceneHD', + 'wizard': True, 'options': [ { 'name': 'enabled', diff --git a/couchpotato/core/providers/torrent/torrentday/__init__.py b/couchpotato/core/providers/torrent/torrentday/__init__.py index 2ebf0d94..1a4d3c7f 100644 --- a/couchpotato/core/providers/torrent/torrentday/__init__.py +++ b/couchpotato/core/providers/torrent/torrentday/__init__.py @@ -12,6 +12,7 @@ config = [{ 'list': 'torrent_providers', 'name': 'TorrentDay', 'description': 'See TorrentDay', + 'wizard': True, 'options': [ { 'name': 'enabled', diff --git a/couchpotato/core/providers/torrent/torrentleech/__init__.py b/couchpotato/core/providers/torrent/torrentleech/__init__.py index 5d1de874..d96ac064 100644 --- a/couchpotato/core/providers/torrent/torrentleech/__init__.py +++ b/couchpotato/core/providers/torrent/torrentleech/__init__.py @@ -12,6 +12,7 @@ config = [{ 'list': 'torrent_providers', 'name': 'TorrentLeech', 'description': 'See TorrentLeech', + 'wizard': True, 'options': [ { 'name': 'enabled', diff --git a/couchpotato/static/scripts/page/settings.js b/couchpotato/static/scripts/page/settings.js index a050b3fe..ddb2abf1 100644 --- a/couchpotato/static/scripts/page/settings.js +++ b/couchpotato/static/scripts/page/settings.js @@ -301,7 +301,7 @@ Page.Settings = new Class({ createList: function(content_container){ return new Element('div.option_list').grab( new Element('h3', { - 'text': 'Enable more providers' + 'text': 'Enable another' }) ).inject(content_container) } diff --git a/couchpotato/static/style/page/settings.css b/couchpotato/static/style/page/settings.css index b9c9ea4e..8d0b0f2e 100644 --- a/couchpotato/static/style/page/settings.css +++ b/couchpotato/static/style/page/settings.css @@ -163,6 +163,7 @@ .page .option_list .enabler { padding: 0; + margin-left: 5px !important; } .page .option_list .enabler:not(.disabled) { From 7c38ad1c0088e6e8480b8f3adb8863462ba715d0 Mon Sep 17 00:00:00 2001 From: Ruud Date: Wed, 23 Jan 2013 22:23:52 +0100 Subject: [PATCH 09/14] Remove non-int backup folders. closes #1298 --- couchpotato/runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/runner.py b/couchpotato/runner.py index 7062c75b..97d15a55 100644 --- a/couchpotato/runner.py +++ b/couchpotato/runner.py @@ -98,7 +98,7 @@ def runCouchPotato(options, base_path, args, data_dir = None, log_dir = None, En total_backups = len(backups) for backup in backups: if total_backups > 3: - if int(os.path.basename(backup)) < time.time() - 259200: + if tryInt(os.path.basename(backup)) < time.time() - 259200: for src_file in src_files: b_file = os.path.join(backup, os.path.basename(src_file)) if os.path.isfile(b_file): From 2a451c255e4bec393d8747bd9064405083645994 Mon Sep 17 00:00:00 2001 From: ikkemaniac Date: Thu, 17 Jan 2013 19:55:45 +0100 Subject: [PATCH 10/14] Rename var for naming consistency --- couchpotato/core/notifications/email/main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/couchpotato/core/notifications/email/main.py b/couchpotato/core/notifications/email/main.py index 118ed1b6..0194ade7 100644 --- a/couchpotato/core/notifications/email/main.py +++ b/couchpotato/core/notifications/email/main.py @@ -15,9 +15,9 @@ class Email(Notification): # Extract all the settings from settings from_address = self.conf('from') - to = self.conf('to') - smtp_server = self.conf('smtp_server') + to_address = self.conf('to') ssl = self.conf('ssl') + smtp_server = self.conf('smtp_server') smtp_user = self.conf('smtp_user') smtp_pass = self.conf('smtp_pass') @@ -25,7 +25,7 @@ class Email(Notification): message = MIMEText(toUnicode(message)) message['Subject'] = self.default_title message['From'] = from_address - message['To'] = to + message['To'] = to_address try: # Open the SMTP connection, via SSL if requested @@ -36,7 +36,7 @@ class Email(Notification): mailserver.login(smtp_user, smtp_pass) # Send the e-mail - mailserver.sendmail(from_address, to, message.as_string()) + mailserver.sendmail(from_address, to_address, message.as_string()) # Close the SMTP connection mailserver.quit() From 35a9739ec5647485c6267c917ac328a4d7d67dae Mon Sep 17 00:00:00 2001 From: ikkemaniac Date: Thu, 17 Jan 2013 21:36:08 +0100 Subject: [PATCH 11/14] Improve debugging for email notifications --- couchpotato/core/notifications/email/main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/couchpotato/core/notifications/email/main.py b/couchpotato/core/notifications/email/main.py index 0194ade7..6c957227 100644 --- a/couchpotato/core/notifications/email/main.py +++ b/couchpotato/core/notifications/email/main.py @@ -29,18 +29,23 @@ class Email(Notification): try: # Open the SMTP connection, via SSL if requested + log.debug("SMTP over SSL %s", ("enabled" if ssl == 1 else "disabled")) mailserver = smtplib.SMTP_SSL(smtp_server) if ssl == 1 else smtplib.SMTP(smtp_server) # Check too see if an login attempt should be attempted if len(smtp_user) > 0: + log.debug("Loggin in on SMTP server using username \'%s\'%s", (smtp_user, " and password" if len(smtp_pass) > 0 else "")) mailserver.login(smtp_user, smtp_pass) # Send the e-mail + log.debug("Sending the email") mailserver.sendmail(from_address, to_address, message.as_string()) # Close the SMTP connection mailserver.quit() - log.info('Email notifications sent.') + + log.info('Email notification sent') + return True except: log.error('E-mail failed: %s', traceback.format_exc()) From 0456a1e820419008eedfa7afb3cb1c01cd1b0ff1 Mon Sep 17 00:00:00 2001 From: Ruud Date: Wed, 23 Jan 2013 22:29:02 +0100 Subject: [PATCH 12/14] Typo --- couchpotato/core/notifications/email/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/core/notifications/email/main.py b/couchpotato/core/notifications/email/main.py index 6c957227..be61e944 100644 --- a/couchpotato/core/notifications/email/main.py +++ b/couchpotato/core/notifications/email/main.py @@ -34,7 +34,7 @@ class Email(Notification): # Check too see if an login attempt should be attempted if len(smtp_user) > 0: - log.debug("Loggin in on SMTP server using username \'%s\'%s", (smtp_user, " and password" if len(smtp_pass) > 0 else "")) + log.debug("Logging on to SMTP server using username \'%s\'%s", (smtp_user, " and a password" if len(smtp_pass) > 0 else "")) mailserver.login(smtp_user, smtp_pass) # Send the e-mail From 749075b4cbad2dea460a35c4f2d565f8304b7c65 Mon Sep 17 00:00:00 2001 From: Ruud Date: Wed, 23 Jan 2013 22:50:31 +0100 Subject: [PATCH 13/14] Setting cleanup --- couchpotato/core/notifications/notifymywp/__init__.py | 2 +- couchpotato/static/style/page/settings.css | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/couchpotato/core/notifications/notifymywp/__init__.py b/couchpotato/core/notifications/notifymywp/__init__.py index 4e52761d..6e0bd06d 100644 --- a/couchpotato/core/notifications/notifymywp/__init__.py +++ b/couchpotato/core/notifications/notifymywp/__init__.py @@ -10,7 +10,7 @@ config = [{ 'tab': 'notifications', 'list': 'notification_providers', 'name': 'notifymywp', - 'label': 'Notify My Windows Phone', + 'label': 'Windows Phone', 'options': [ { 'name': 'enabled', diff --git a/couchpotato/static/style/page/settings.css b/couchpotato/static/style/page/settings.css index 8d0b0f2e..bcd0b774 100644 --- a/couchpotato/static/style/page/settings.css +++ b/couchpotato/static/style/page/settings.css @@ -176,7 +176,7 @@ .page .option_list h3 { padding: 0; - margin: 10px 0 0 0; + margin: 10px 5px 0; text-align: center; font-weight: normal; text-shadow: none; @@ -189,7 +189,7 @@ display: inline-block; margin: 3px 3px 3px 20px; padding: 4px 0; - width: 159px; + width: 173px; vertical-align: top; } @@ -629,14 +629,14 @@ .group_userscript .or { float: left; - margin: 20px 10px; + margin: 20px -10px 0 10px; } .group_userscript .bookmarklet { display: block; display: block; float: left; - padding: 20px 15px 0 0 ; + padding: 20px 15px 0 25px; border-radius: 5px; } From cad9bfae9fe59bd4cb41b9bea5006308653c277a Mon Sep 17 00:00:00 2001 From: Ruud Date: Wed, 23 Jan 2013 22:54:02 +0100 Subject: [PATCH 14/14] Transmission: Don't use ratio when not filled in. --- couchpotato/core/downloaders/transmission/main.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/couchpotato/core/downloaders/transmission/main.py b/couchpotato/core/downloaders/transmission/main.py index 63c9de9d..d7354823 100644 --- a/couchpotato/core/downloaders/transmission/main.py +++ b/couchpotato/core/downloaders/transmission/main.py @@ -38,10 +38,11 @@ class Transmission(Downloader): 'download-dir': folder_path } - torrent_params = { - 'seedRatioLimit': self.conf('ratio'), - 'seedRatioMode': (0 if self.conf('ratio') else 1) - } + if self.conf('ratio'): + torrent_params = { + 'seedRatioLimit': self.conf('ratio'), + 'seedRatioMode': self.conf('ratio') + } if not filedata and data.get('type') == 'torrent': log.error('Failed sending torrent, no data')