CC-3628: Media Monitor not sending a delete message to Airtime

- fixed
This commit is contained in:
James 2012-04-12 17:20:31 -04:00
parent d4533ca545
commit 86718cc58e
1 changed files with 4 additions and 2 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)