Check movie exists before adding releases
This commit is contained in:
@@ -8,7 +8,7 @@ from couchpotato.core.settings.model import File
|
||||
from couchpotato.environment import Env
|
||||
from enzyme.exceptions import NoParserError, ParseError
|
||||
from guessit import guess_movie_info
|
||||
from subliminal.videos import scan, Video
|
||||
from subliminal.videos import Video
|
||||
import enzyme
|
||||
import os
|
||||
import re
|
||||
|
||||
@@ -101,6 +101,10 @@ class Searcher(Plugin):
|
||||
if len(sorted_results) == 0:
|
||||
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
|
||||
for nzb in sorted_results:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user