From 7b5b5f8ff0e170b8102a7f65376190e6a504d5c4 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Tue, 29 Jul 2014 15:20:03 +0200 Subject: [PATCH] Hopefully fixed controller stream metadata updater. --- src/controller/controller_streams.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controller/controller_streams.cpp b/src/controller/controller_streams.cpp index bb9ad953..4ec585c7 100644 --- a/src/controller/controller_streams.cpp +++ b/src/controller/controller_streams.cpp @@ -116,12 +116,11 @@ namespace Controller { DEBUG_MSG(DLVL_INSANE, "(re)loading metadata for stream %s", name.c_str()); if ((URL.substr(URL.size() - 5) != ".dtsc") && (stat((URL+".dtsh").c_str(), &fileinfo) != 0)){ DEBUG_MSG(DLVL_INSANE, "Stream %s is non-DTSC file without DTSH. Opening stream to generate DTSH...", name.c_str()); - Util::Stream::getVod(URL, name); + Util::Stream::getStream(name); DEBUG_MSG(DLVL_INSANE, "Waiting for stream %s to open...", name.c_str()); //wait for the stream { - IPC::sharedPage streamIndex; - streamIndex.init(name, 8 * 1024 * 1024); + IPC::sharedPage streamIndex(name, 8 * 1024 * 1024); if (!streamIndex.mapped){ DEBUG_MSG(DLVL_INSANE, "Stream %s opening failed! Cancelling and marking as corrupt.", name.c_str()); data["meta"].null(); @@ -131,6 +130,7 @@ namespace Controller { Log("WARN", "Source file " + URL + " seems to be corrupt."); } data["online"] = 0; + return; } } DEBUG_MSG(DLVL_INSANE, "Stream %s opened", name.c_str());