Catch guessit error. fixes #108

This commit is contained in:
Ruud
2012-04-19 21:38:35 +02:00
parent 05fa253fc7
commit 20b0334b8e
+9 -6
View File
@@ -696,12 +696,15 @@ class Scanner(Plugin):
# Use guessit first
if file_name:
guess = guess_movie_info(file_name)
if guess.get('title') and guess.get('year'):
return {
'name': guess.get('title'),
'year': guess.get('year'),
}
try:
guess = guess_movie_info(file_name)
if guess.get('title') and guess.get('year'):
return {
'name': guess.get('title'),
'year': guess.get('year'),
}
except:
log.debug('Could not detect via guessit "%s": %s' % (file_name, traceback.format_exc()))
# Backup to simple
cleaned = ' '.join(re.split('\W+', simplifyString(release_name)))