CC-1799 : Live Studio Playout from media library (pytagsfs)

metadata almost working from airtime form -> python daemon. Just need to look into permissions for some stor folders.
This commit is contained in:
naomiaro 2011-05-05 10:55:14 -04:00 committed by martin
parent 5be039d349
commit a3d7c5e70b
5 changed files with 144 additions and 11 deletions

View file

@ -40,5 +40,27 @@ class RabbitMq
}
}
public static function SendFileMetaData($md)
{
global $CC_CONFIG;
$conn = new AMQPConnection($CC_CONFIG["rabbitmq"]["host"],
$CC_CONFIG["rabbitmq"]["port"],
$CC_CONFIG["rabbitmq"]["user"],
$CC_CONFIG["rabbitmq"]["password"]);
$channel = $conn->channel();
$channel->access_request($CC_CONFIG["rabbitmq"]["vhost"], false, false, true, true);
$EXCHANGE = 'airtime-media-monitor';
$channel->exchange_declare($EXCHANGE, 'direct', false, true);
$data = json_encode($md);
$msg = new AMQPMessage($data, array('content_type' => 'text/plain'));
$channel->basic_publish($msg, $EXCHANGE);
$channel->close();
$conn->close();
}
}