From 74e4425eadb3bff59407ed3bca0337dcccfdb983 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Fri, 31 Aug 2012 17:22:25 -0400 Subject: [PATCH 1/3] cc-4329: Fixed this by adding liquid soap playability test from mm1 --- python_apps/media-monitor2/media/monitor/pure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_apps/media-monitor2/media/monitor/pure.py b/python_apps/media-monitor2/media/monitor/pure.py index 005178157..2fdf3aa5f 100644 --- a/python_apps/media-monitor2/media/monitor/pure.py +++ b/python_apps/media-monitor2/media/monitor/pure.py @@ -459,7 +459,7 @@ def file_playable(pathname): #is opened with write permissions, and this causes an inotify ON_CLOSE_WRITE #event to be fired :/ - command = ("sudo -u pypo airtime-liquidsoap -c 'output.dummy" + \ + command = ("airtime-liquidsoap -c 'output.dummy" + \ "(audio_to_stereo(single(\"%s\")))' > /dev/null 2>&1") % \ pathname.replace("'", "'\\''") return_code = subprocess.call(command, shell=True) From 69ac52973df150aff549b2c17f047d11b0a05de9 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Fri, 31 Aug 2012 17:58:12 -0400 Subject: [PATCH 2/3] Replaygain: added better logging --- python_apps/media-monitor2/media/update/replaygain.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python_apps/media-monitor2/media/update/replaygain.py b/python_apps/media-monitor2/media/update/replaygain.py index ef15262f0..caabc9350 100644 --- a/python_apps/media-monitor2/media/update/replaygain.py +++ b/python_apps/media-monitor2/media/update/replaygain.py @@ -121,6 +121,8 @@ def calculate_replay_gain(file_path): matches = search.groups() if len(matches) == 1: replay_gain = matches[0] + else: + logger.warn("Received more than 1 match in: '%s'" % str(matches)) return replay_gain From d54cf1c2129d1564b965b4b272163f3562f1a515 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Fri, 31 Aug 2012 18:10:18 -0400 Subject: [PATCH 3/3] mm2: added some decent debuggin --- python_apps/media-monitor2/media/monitor/watchersyncer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python_apps/media-monitor2/media/monitor/watchersyncer.py b/python_apps/media-monitor2/media/monitor/watchersyncer.py index 86e66f3f9..869d55919 100644 --- a/python_apps/media-monitor2/media/monitor/watchersyncer.py +++ b/python_apps/media-monitor2/media/monitor/watchersyncer.py @@ -46,7 +46,11 @@ class RequestSync(threading.Thread,Loggable): except BadSongFile as e: self.logger.info("This should never occur anymore!!!") self.logger.info("Bad song file: '%s'" % e.path) - except Exception as e: self.unexpected_exception( e ) + except Exception as e: + self.unexpected_exception( e ) + if hasattr(request_event, 'path'): + self.logger.info("Possibly related to path: '%s'" % + request_event.path) def make_req(): self.apiclient.send_media_monitor_requests( packed_requests ) for try_index in range(0,self.retries):