Check for proper returned value. fixes #126

This commit is contained in:
Ruud committed 2012-04-21 21:13:55 +02:00
1 parent 6220d3e63d
commit a9830ab0a6
2 files changed
+2

No files matched your search

+1
View File
@@ -56,6 +56,7 @@ 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)
if identifiers:
added_identifiers.extend(identifiers) added_identifiers.extend(identifiers)
# Break if CP wants to shut down # Break if CP wants to shut down
+1
View File
@@ -129,6 +129,7 @@ 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)
if library_item:
added_identifier.append(library_item['identifier']) added_identifier.append(library_item['identifier'])
return added_identifier return added_identifier