From 15ab745bd03ec84136e2cdb7f6fd0c7a9071026c Mon Sep 17 00:00:00 2001 From: Ruud Date: Sat, 8 Jun 2013 18:04:46 +0200 Subject: [PATCH] Don't assume imdb key. fixes #1819 --- couchpotato/core/plugins/scanner/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/plugins/scanner/main.py b/couchpotato/core/plugins/scanner/main.py index 56e5715..55e0f35 100644 --- a/couchpotato/core/plugins/scanner/main.py +++ b/couchpotato/core/plugins/scanner/main.py @@ -582,7 +582,7 @@ class Scanner(Plugin): movie = fireEvent('movie.by_hash', file = cur_file, merge = True) if len(movie) > 0: - imdb_id = movie[0]['imdb'] + imdb_id = movie[0].get('imdb') if imdb_id: log.debug('Found movie via OpenSubtitleHash: %s', cur_file) break @@ -600,7 +600,7 @@ class Scanner(Plugin): movie = fireEvent('movie.search', q = '%(name)s %(year)s' % name_year, merge = True, limit = 1) if len(movie) > 0: - imdb_id = movie[0]['imdb'] + imdb_id = movie[0].get('imdb') log.debug('Found movie via search: %s', cur_file) if imdb_id: break else: