From 8e65e72c7204e8b4b8394de7cb911c32d7d8a835 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 4 Mar 2016 13:04:17 +0300 Subject: [PATCH] driver/record.cpp: fix webtv record for live urls via lua plugins --- src/driver/record.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/driver/record.cpp b/src/driver/record.cpp index fb4211c20..38e72ec7e 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -1894,7 +1894,6 @@ void CStreamRec::GetPids(CZapitChannel * channel) void CStreamRec::FillMovieInfo(CZapitChannel * channel, APIDList & apid_list) { - CRecordInstance::FillMovieInfo(channel, apid_list); recMovieInfo->VideoType = 0; for (unsigned i = 0; i < ofcx->nb_streams; i++) { @@ -2014,13 +2013,14 @@ record_error_msg_t CStreamRec::Record() return ret; } + CRecordInstance::FillMovieInfo(channel, apid_list); if (!Open(channel) || !Start()) { Close(); hintBox.hide(); return RECORD_FAILURE; } - FillMovieInfo(channel, apid_list); + SaveXml(); if(recording_id == 0) { time_t now = time(NULL); @@ -2062,6 +2062,12 @@ bool CStreamRec::Open(CZapitChannel * channel) if (url.empty()) return false; + std::string pretty_name; + if (!CMoviePlayerGui::getInstance(true).getLiveUrl(channel->getChannelID(), channel->getUrl(), channel->getScriptName(), url, pretty_name, recMovieInfo->epgInfo1, recMovieInfo->epgInfo2)) { + printf("%s: getLiveUrl() [%s] failed!\n", __FUNCTION__, url.c_str()); + return false; + } + //av_log_set_level(AV_LOG_VERBOSE); av_register_all(); avcodec_register_all();