file_manager: check for unsuccessful attempt at metadata extraction
If the metadata script encoutners an error it will return an empty dict for the "metadata" item. Do not update the metadata storage or send a notification if the dict is empty. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
d59d1e5f7f
commit
2a34986acb
|
@ -535,6 +535,9 @@ class MetadataStorage:
|
|||
raise self.server.error("Unable to extract metadata")
|
||||
path = self.script_response['file']
|
||||
metadata = self.script_response['metadata']
|
||||
if not metadata:
|
||||
# This indicates an error, do not add metadata for this
|
||||
raise self.server.error("Unable to extract metadata")
|
||||
self.metadata[path] = dict(metadata)
|
||||
metadata['filename'] = path
|
||||
if do_notify:
|
||||
|
|
Loading…
Reference in New Issue