Check for proper returned value. fixes #126
This commit is contained in:
@@ -56,7 +56,8 @@ class Manage(Plugin):
|
|||||||
|
|
||||||
log.info('Updating manage library: %s' % directory)
|
log.info('Updating manage library: %s' % directory)
|
||||||
identifiers = fireEvent('scanner.folder', folder = directory, newer_than = last_update, single = True)
|
identifiers = fireEvent('scanner.folder', folder = directory, newer_than = last_update, single = True)
|
||||||
added_identifiers.extend(identifiers)
|
if identifiers:
|
||||||
|
added_identifiers.extend(identifiers)
|
||||||
|
|
||||||
# Break if CP wants to shut down
|
# Break if CP wants to shut down
|
||||||
if self.shuttingDown():
|
if self.shuttingDown():
|
||||||
|
|||||||
@@ -129,7 +129,8 @@ class Scanner(Plugin):
|
|||||||
# Add release
|
# Add release
|
||||||
fireEvent('release.add', group = group)
|
fireEvent('release.add', group = group)
|
||||||
library_item = fireEvent('library.update', identifier = group['library'].get('identifier'), single = True)
|
library_item = fireEvent('library.update', identifier = group['library'].get('identifier'), single = True)
|
||||||
added_identifier.append(library_item['identifier'])
|
if library_item:
|
||||||
|
added_identifier.append(library_item['identifier'])
|
||||||
|
|
||||||
return added_identifier
|
return added_identifier
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user