Check watchlist adds in automation plugin, not the providers. fix #838

This commit is contained in:
Ruud
2012-10-23 00:20:04 +02:00
parent b71f003ad8
commit e918e6b12f
5 changed files with 14 additions and 36 deletions
+3 -2
View File
@@ -24,8 +24,9 @@ class Automation(Plugin):
prop_name = 'automation.added.%s' % imdb_id
added = Env.prop(prop_name, default = False)
if not added:
added_movie = fireEvent('movie.add', params = {'identifier': imdb_id}, force_readd = False, search_after = False, single = True)
movie_ids.append(added_movie['id'])
added_movie = fireEvent('movie.add', params = {'identifier': imdb_id}, force_readd = False, search_after = False, update_library = True, single = True)
if added_movie:
movie_ids.append(added_movie['id'])
Env.prop(prop_name, True)
for movie_id in movie_ids:
+2 -2
View File
@@ -283,7 +283,7 @@ class MoviePlugin(Plugin):
'movies': movies,
})
def add(self, params = {}, force_readd = True, search_after = True):
def add(self, params = {}, force_readd = True, search_after = True, update_library = False):
if not params.get('identifier'):
msg = 'Can\'t add movie without imdb identifier.'
@@ -303,7 +303,7 @@ class MoviePlugin(Plugin):
pass
library = fireEvent('library.add', single = True, attrs = params, update_after = False)
library = fireEvent('library.add', single = True, attrs = params, update_after = update_library)
# Status
status_active = fireEvent('status.add', 'active', single = True)