Simpler notifications
This commit is contained in:
@@ -156,7 +156,7 @@ class Renamer(Plugin):
|
||||
|
||||
# Notify on download
|
||||
download_message = 'Download of %s (%s) successful.' % (group['library']['titles'][0]['title'], replacements['quality'])
|
||||
fireEvent('notify', type = 'movie.downloaded', message = download_message, data = group)
|
||||
fireEvent('movie.downloaded', message = download_message, data = group)
|
||||
|
||||
# Before renaming, remove the lower quality files
|
||||
db = get_session()
|
||||
@@ -184,7 +184,7 @@ class Renamer(Plugin):
|
||||
|
||||
# Notify on rename fail
|
||||
download_message = 'Renaming of %s (%s) canceled, exists in %s already.' % (movie.library.titles[0].title, group['meta_data']['quality']['label'], release.quality.label)
|
||||
fireEvent('notify', type = 'movie.renaming.canceled', message = download_message, data = group)
|
||||
fireEvent('movie.renaming.canceled', message = download_message, data = group)
|
||||
|
||||
break
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ class Searcher(Plugin):
|
||||
db.commit()
|
||||
|
||||
log.info('Downloading of %s successful.' % nzb.get('name'))
|
||||
fireEvent('notify', type = 'movie.snatched', message = 'Downloading of %s successful.' % nzb.get('name'), data = rls.to_dict())
|
||||
fireEvent('movie.snatched', message = 'Downloading of %s successful.' % nzb.get('name'), data = rls.to_dict())
|
||||
|
||||
return True
|
||||
|
||||
@@ -117,6 +117,10 @@ class Searcher(Plugin):
|
||||
log.info('Better quality (%s) already available or snatched for %s' % (type['quality']['label'], default_title))
|
||||
break
|
||||
|
||||
# Break if CP wants to shut down
|
||||
if self.shuttingDown():
|
||||
break
|
||||
|
||||
return False
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user