Private GIT

Skip to content
Snippets Groups Projects
Commit 61a3a038 authored by Ruud's avatar Ruud
Browse files

Search after added all movies. fix #702

parent 7b1f17c0
No related branches found
No related tags found
No related merge requests found
...@@ -18,9 +18,16 @@ class Automation(Plugin): ...@@ -18,9 +18,16 @@ class Automation(Plugin):
def addMovies(self): def addMovies(self):
movies = fireEvent('automation.get_movies', merge = True) movies = fireEvent('automation.get_movies', merge = True)
movie_ids = []
for imdb_id in movies: for imdb_id in movies:
prop_name = 'automation.added.%s' % imdb_id prop_name = 'automation.added.%s' % imdb_id
added = Env.prop(prop_name, default = False) added = Env.prop(prop_name, default = False)
if not added: if not added:
fireEvent('movie.add', params = {'identifier': imdb_id}, force_readd = False) added_movie = fireEvent('movie.add', params = {'identifier': imdb_id}, force_readd = False, search_after = False, single = True)
movie_ids.append(added_movie['id'])
Env.prop(prop_name, True) Env.prop(prop_name, True)
for movie_id in movie_ids:
movie_dict = fireEvent('movie.get', movie_id, single = True)
fireEvent('searcher.single', movie_dict)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment