From 5af5749d4ad3d30514b3ca53d61a7e07273eb3cf Mon Sep 17 00:00:00 2001 From: mano3m Date: Sat, 7 Jun 2014 16:04:54 +0200 Subject: [PATCH] Catch missing deleted profile error @RuudBurger should we reset the profile of the media to default or None in case this happens or leave it the way it is? --- couchpotato/core/plugins/renamer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/couchpotato/core/plugins/renamer.py b/couchpotato/core/plugins/renamer.py index 2a6c4a8..1e35b84 100644 --- a/couchpotato/core/plugins/renamer.py +++ b/couchpotato/core/plugins/renamer.py @@ -449,7 +449,10 @@ class Renamer(Plugin): # Get media quality profile profile = None if media.get('profile_id'): - profile = db.get('id', media['profile_id']) + try: + profile = db.get('id', media['profile_id']) + except: + log.error('Error getting quality profile for %s: %s', (media_title, traceback.format_exc())) else: log.debug('Media has no quality profile: %s', media_title)