Shutdown event

This commit is contained in:
Ruud
2011-08-29 23:58:35 +02:00
parent a77dc35613
commit 4fd3f91a77
6 changed files with 85 additions and 48 deletions
@@ -30,6 +30,7 @@ class Searcher(Plugin):
).all()
for movie in movies:
self.single(movie.to_dict(deep = {
'profile': {'types': {'quality': {}}},
'releases': {'status': {}, 'quality': {}},
@@ -37,6 +38,10 @@ class Searcher(Plugin):
'files': {}
}))
# Break if CP wants to shut down
if self.shuttingDown():
break
def single(self, movie):
downloaded_status = fireEvent('status.get', 'downloaded', single = True)