Check for proper returned value. fixes #126

This commit is contained in:
Ruud
2012-04-21 21:13:55 +02:00
parent 6220d3e63d
commit a9830ab0a6
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -56,7 +56,8 @@ class Manage(Plugin):
log.info('Updating manage library: %s' % directory)
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
if self.shuttingDown():
+2 -1
View File
@@ -129,7 +129,8 @@ class Scanner(Plugin):
# Add release
fireEvent('release.add', group = group)
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