diff --git a/airtime_mvc/public/index.php b/airtime_mvc/public/index.php index 78f94c489..46b97adfc 100644 --- a/airtime_mvc/public/index.php +++ b/airtime_mvc/public/index.php @@ -1,8 +1,12 @@ bootstrap()->run(); } } catch (Exception $e) { + echo $e->getMessage(); Logging::info($e->getMessage()); } diff --git a/python_apps/api_clients/api_client.py b/python_apps/api_clients/api_client.py index d2fbf23be..130724f66 100644 --- a/python_apps/api_clients/api_client.py +++ b/python_apps/api_clients/api_client.py @@ -477,6 +477,7 @@ class AirtimeApiClient(): def list_all_db_files(self, dir_id, all_files=True): logger = self.logger try: + all_files = u"1" if all_files else u"0" url = self.construct_url("list_all_db_files") url = url.replace("%%dir_id%%", dir_id) url = url.replace("%%all%%", all_files) diff --git a/python_apps/media-monitor2/media/monitor/airtime.py b/python_apps/media-monitor2/media/monitor/airtime.py index bb8f1dd9d..a295686b1 100644 --- a/python_apps/media-monitor2/media/monitor/airtime.py +++ b/python_apps/media-monitor2/media/monitor/airtime.py @@ -54,6 +54,7 @@ class AirtimeNotifier(Loggable): message.ack() self.logger.info("Received md from RabbitMQ: %s" % str(body)) m = json.loads(message.body) + if 'directory' in m: m['directory'] = normpath(m['directory']) self.handler.message(m) class AirtimeMessageReceiver(Loggable): @@ -119,6 +120,7 @@ class AirtimeMessageReceiver(Loggable): % md_path, e) def new_watch(self, msg): + msg['directory'] = normpath(msg['directory']) self.logger.info("Creating watch for directory: '%s'" % msg['directory']) if not os.path.exists(msg['directory']): diff --git a/python_apps/media-monitor2/media/monitor/pure.py b/python_apps/media-monitor2/media/monitor/pure.py index d60373d26..480778ebc 100644 --- a/python_apps/media-monitor2/media/monitor/pure.py +++ b/python_apps/media-monitor2/media/monitor/pure.py @@ -296,7 +296,7 @@ def organized_path(old_path, root_path, orig_md): filepath = None ext = extension(old_path) def default_f(dictionary, key): - if key in dictionary: return len(dictionary[key]) == 0 + if key in dictionary: return len(str(dictionary[key])) == 0 else: return True # We set some metadata elements to a default "unknown" value because we use # these fields to create a path hence they cannot be empty Here "normal"