Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
b8d9861001
3 changed files with 8 additions and 2 deletions
|
@ -459,7 +459,7 @@ def file_playable(pathname):
|
||||||
#is opened with write permissions, and this causes an inotify ON_CLOSE_WRITE
|
#is opened with write permissions, and this causes an inotify ON_CLOSE_WRITE
|
||||||
#event to be fired :/
|
#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") % \
|
"(audio_to_stereo(single(\"%s\")))' > /dev/null 2>&1") % \
|
||||||
pathname.replace("'", "'\\''")
|
pathname.replace("'", "'\\''")
|
||||||
return_code = subprocess.call(command, shell=True)
|
return_code = subprocess.call(command, shell=True)
|
||||||
|
|
|
@ -46,7 +46,11 @@ class RequestSync(threading.Thread,Loggable):
|
||||||
except BadSongFile as e:
|
except BadSongFile as e:
|
||||||
self.logger.info("This should never occur anymore!!!")
|
self.logger.info("This should never occur anymore!!!")
|
||||||
self.logger.info("Bad song file: '%s'" % e.path)
|
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():
|
def make_req():
|
||||||
self.apiclient.send_media_monitor_requests( packed_requests )
|
self.apiclient.send_media_monitor_requests( packed_requests )
|
||||||
for try_index in range(0,self.retries):
|
for try_index in range(0,self.retries):
|
||||||
|
|
|
@ -121,6 +121,8 @@ def calculate_replay_gain(file_path):
|
||||||
matches = search.groups()
|
matches = search.groups()
|
||||||
if len(matches) == 1:
|
if len(matches) == 1:
|
||||||
replay_gain = matches[0]
|
replay_gain = matches[0]
|
||||||
|
else:
|
||||||
|
logger.warn("Received more than 1 match in: '%s'" % str(matches))
|
||||||
|
|
||||||
return replay_gain
|
return replay_gain
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue