From 6d048e0003a44b7c8377dfd7fe9056738e0bce6d Mon Sep 17 00:00:00 2001 From: Ruud Date: Mon, 2 Jun 2014 14:35:06 +0200 Subject: [PATCH 1/2] Don't try to parse faulty IMDB page --- couchpotato/core/media/movie/providers/automation/imdb.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/couchpotato/core/media/movie/providers/automation/imdb.py b/couchpotato/core/media/movie/providers/automation/imdb.py index 37d762bc..9b4c1171 100644 --- a/couchpotato/core/media/movie/providers/automation/imdb.py +++ b/couchpotato/core/media/movie/providers/automation/imdb.py @@ -39,6 +39,11 @@ class IMDBBase(Automation, RSS): except: try: split = splitString(html, split_on = "
") + + if len(split) < 2: + log.error('Failed parsing IMDB page "%s", unexpected html.', url) + return [] + html = BeautifulSoup(split[1]) for x in ['list compact', 'lister', 'list detail sub-list']: html2 = html.find('div', attrs = { From c82b1f51e3fe7802d8d0db43f513b5017d4d103e Mon Sep 17 00:00:00 2001 From: Ruud Date: Mon, 2 Jun 2014 14:44:09 +0200 Subject: [PATCH 2/2] Get messages from last 7 days, not just unread. fix #3331 --- couchpotato/core/notifications/core/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/couchpotato/core/notifications/core/main.py b/couchpotato/core/notifications/core/main.py index 0cd8e579..526099fd 100644 --- a/couchpotato/core/notifications/core/main.py +++ b/couchpotato/core/notifications/core/main.py @@ -258,14 +258,14 @@ class CoreNotifier(Notification): messages = [] - # Get unread + # Get last message if init: db = get_db() - notifications = db.all('notification_unread', with_doc = True) + notifications = db.all('notification', with_doc = True) for n in notifications: - if n['doc'].get('time') > (time.time() - 259200): + if n['doc'].get('time') > (time.time() - 604800): messages.append(n['doc']) return {