Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
Martin Konecny 2012-04-12 17:23:03 -04:00
commit 6c17cf6e24
8 changed files with 152 additions and 32 deletions

View file

@ -9,12 +9,14 @@ class MediaMonitorWorkerProcess:
while True:
try:
event = queue.get()
notifier.logger.info("received event %s", event)
if event['mode'] == AirtimeMediaConfig.MODE_CREATE:
filepath = event['filepath']
if mediamonitorcommon.test_file_playability(filepath):
notifier.logger.info("received event %s", event)
if mediamonitorcommon.test_file_playability(filepath):
notifier.update_airtime(event)
else:
notifier.logger.warn("Liquidsoap integrity check for file at %s failed. Not adding to media library.", filepath)
else:
notifier.update_airtime(event)
except Exception, e:
notifier.logger.error(e)