From cf3dbd2a9703b54879d0953d2969c3380e333b80 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 7 Aug 2012 17:12:40 -0400 Subject: [PATCH] cc-4105: fixed handling of list values in mutagen --- python_apps/media-monitor2/media/monitor/bootstrap.py | 3 +-- python_apps/media-monitor2/media/monitor/metadata.py | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/python_apps/media-monitor2/media/monitor/bootstrap.py b/python_apps/media-monitor2/media/monitor/bootstrap.py index 9c9041ec9..e87a588b2 100644 --- a/python_apps/media-monitor2/media/monitor/bootstrap.py +++ b/python_apps/media-monitor2/media/monitor/bootstrap.py @@ -24,8 +24,7 @@ class Bootstrapper(Loggable): note that because of the way list_directories works we also flush the import directory as well I think """ - for d in self.db.list_storable_paths(): - self.flush_watch(d, last_ran) + for d in self.db.list_storable_paths(): self.flush_watch(d, last_ran) def flush_watch(self, directory, last_ran): """ diff --git a/python_apps/media-monitor2/media/monitor/metadata.py b/python_apps/media-monitor2/media/monitor/metadata.py index 75302c9a7..373bcc304 100644 --- a/python_apps/media-monitor2/media/monitor/metadata.py +++ b/python_apps/media-monitor2/media/monitor/metadata.py @@ -127,6 +127,8 @@ class Metadata(Loggable): # genre is one example. In that case mutagen will return a list # of values metadata[k] = v[0] + #if len(v) == 1: metadata[k] = v[0] + #else: raise Exception("Unknown mutagen %s:%s" % (k,str(v))) else: metadata[k] = v self.__metadata = {} # Start populating a dictionary of airtime metadata in __metadata