New API format support in stream.cpp

This commit is contained in:
Thulinma 2013-03-04 22:02:26 +01:00
parent ddb681fb8c
commit db735a73c7

View file

@ -51,11 +51,11 @@ Socket::Connection Util::Stream::getStream(std::string streamname){
sanitizeName(streamname); sanitizeName(streamname);
JSON::Value ServConf = JSON::fromFile("/tmp/mist/streamlist"); JSON::Value ServConf = JSON::fromFile("/tmp/mist/streamlist");
if (ServConf["streams"].isMember(streamname)){ if (ServConf["streams"].isMember(streamname)){
if (ServConf["streams"][streamname]["channel"]["URL"].asString()[0] == '/'){ if (ServConf["streams"][streamname]["source"].asString()[0] == '/'){
#if DEBUG >= 4 #if DEBUG >= 4
std::cerr << "Opening VoD stream from file " << ServConf["streams"][streamname]["channel"]["URL"].asString() << std::endl; std::cerr << "Opening VoD stream from file " << ServConf["streams"][streamname]["source"].asString() << std::endl;
#endif #endif
return getVod(ServConf["streams"][streamname]["channel"]["URL"].asString()); return getVod(ServConf["streams"][streamname]["source"].asString());
}else{ }else{
#if DEBUG >= 4 #if DEBUG >= 4
std::cerr << "Opening live stream " << streamname << std::endl; std::cerr << "Opening live stream " << streamname << std::endl;