Fixed Erik's mistakes. Ohai Erik.

This commit is contained in:
Thulinma 2013-10-17 10:02:04 +02:00
parent 79bbe8a078
commit 50b15bb0d6
3 changed files with 8 additions and 3 deletions

View file

@ -83,7 +83,7 @@ int main(int argc, char** argv){
DTSC::File source = DTSC::File(conf.getString("filename")); DTSC::File source = DTSC::File(conf.getString("filename"));
in_out.SendNow(source.getMeta().toNetPacked()); in_out.SendNow(source.getMeta().toNetPacked());
if (DTSC::isFixed(source.getMeta())){ if ( !DTSC::isFixed(source.getMeta())){
std::cerr << "Encountered a non-fixed file." << std::endl; std::cerr << "Encountered a non-fixed file." << std::endl;
return 1; return 1;
} }

View file

@ -70,8 +70,10 @@ namespace Controller {
} }
if ( !DTSC::isFixed(data["meta"])){ if ( !DTSC::isFixed(data["meta"])){
char * tmp_cmd[3] = {0, 0, 0}; char * tmp_cmd[3] = {0, 0, 0};
std::string mistfix = Util::getMyPath() + "MistDTSCFix " + URL; std::string mistfix = Util::getMyPath() + "MistDTSCFix";
Util::Procs::Start("MistFixer", mistfix); tmp_cmd[0] = (char*)mistfix.c_str();
tmp_cmd[1] = (char*)URL.c_str();
Util::Procs::StartPiped("MistFixer", tmp_cmd, 0, 0, 0);
} }
if (Util::epoch() - lastBuffer[name] > 5){ if (Util::epoch() - lastBuffer[name] > 5){
data["error"] = "Available"; data["error"] = "Available";

View file

@ -90,6 +90,9 @@ namespace Info {
fileSpecs.removeMember( "streams" ); fileSpecs.removeMember( "streams" );
} else { } else {
fileSpecs["format"] = "dtsc"; fileSpecs["format"] = "dtsc";
if (DTSC::isFixed(fileSpecs)){
fileSpecs["is_fixed"] = 1ll;
}
JSON::Value tracks = fileSpecs["tracks"]; JSON::Value tracks = fileSpecs["tracks"];
for(JSON::ObjIter trackIt = tracks.ObjBegin(); trackIt != tracks.ObjEnd(); trackIt++){ for(JSON::ObjIter trackIt = tracks.ObjBegin(); trackIt != tracks.ObjEnd(); trackIt++){
if (fileSpecs["tracks"][trackIt->first].isMember("init")){ if (fileSpecs["tracks"][trackIt->first].isMember("init")){