Check movie exists before adding releases

This commit is contained in:
Ruud committed 2012-05-11 15:31:25 +02:00
1 parent 30022fef8f
commit 369f08b00b
2 files changed
+5 -1

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ from couchpotato.core.settings.model import File
from couchpotato.environment import Env from couchpotato.environment import Env
from enzyme.exceptions import NoParserError, ParseError from enzyme.exceptions import NoParserError, ParseError
from guessit import guess_movie_info from guessit import guess_movie_info
from subliminal.videos import scan, Video from subliminal.videos import Video
import enzyme import enzyme
import os import os
import re import re
@@ -101,6 +101,10 @@ class Searcher(Plugin):
if len(sorted_results) == 0: if len(sorted_results) == 0:
log.debug('Nothing found for %s in %s' % (default_title, quality_type['quality']['label'])) log.debug('Nothing found for %s in %s' % (default_title, quality_type['quality']['label']))
# Check if movie isn't deleted while searching
if not db.query(Movie).filter_by(id = movie.get('id')).first():
return
# Add them to this movie releases list # Add them to this movie releases list
for nzb in sorted_results: for nzb in sorted_results: