Browse Source

Watch shutdown when adding automation movies

pull/1944/merge
Ruud 12 years ago
parent
commit
7e44af936d
  1. 10
      couchpotato/core/plugins/automation/main.py

10
couchpotato/core/plugins/automation/main.py

@ -26,6 +26,10 @@ class Automation(Plugin):
movie_ids = []
for imdb_id in movies:
if self.shuttingDown():
break
prop_name = 'automation.added.%s' % imdb_id
added = Env.prop(prop_name, default = False)
if not added:
@ -35,5 +39,11 @@ class Automation(Plugin):
Env.prop(prop_name, True)
for movie_id in movie_ids:
if self.shuttingDown():
break
movie_dict = fireEvent('movie.get', movie_id, single = True)
fireEvent('movie.searcher.single', movie_dict)
return True
Loading…
Cancel
Save