mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 08:21:07 +02:00
Merge branch 'master' of https://github.com/tuxbox-neutrino/gui-neutrino into ni/tuxbox
Conflicts:
src/gui/movieplayer.h
Origin commit data
------------------
Commit: 7ad8496e24
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-01-27 (Fri, 27 Jan 2017)
This commit is contained in:
@@ -2177,7 +2177,7 @@ bool CStreamRec::Open(CZapitChannel * channel)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
std::string pretty_name,headers;
|
std::string pretty_name,headers;
|
||||||
if (!CMoviePlayerGui::getInstance(true).getLiveUrl(channel->getChannelID(), channel->getUrl(), channel->getScriptName(), url, pretty_name, recMovieInfo->epgInfo1, recMovieInfo->epgInfo2,headers)) {
|
if (!CMoviePlayerGui::getInstance(true).getLiveUrl(channel->getUrl(), channel->getScriptName(), url, pretty_name, recMovieInfo->epgInfo1, recMovieInfo->epgInfo2,headers)) {
|
||||||
printf("%s: getLiveUrl() [%s] failed!\n", __FUNCTION__, url.c_str());
|
printf("%s: getLiveUrl() [%s] failed!\n", __FUNCTION__, url.c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -773,7 +773,7 @@ bool CStreamStream::Open()
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
std::string pretty_name, livestreamInfo1, livestreamInfo2, headers;
|
std::string pretty_name, livestreamInfo1, livestreamInfo2, headers;
|
||||||
if (!CMoviePlayerGui::getInstance(true).getLiveUrl(channel->getChannelID(), channel->getUrl(), channel->getScriptName(), url, pretty_name, livestreamInfo1, livestreamInfo2,headers)) {
|
if (!CMoviePlayerGui::getInstance(true).getLiveUrl(channel->getUrl(), channel->getScriptName(), url, pretty_name, livestreamInfo1, livestreamInfo2,headers)) {
|
||||||
printf("%s: getLiveUrl() [%s] failed!\n", __FUNCTION__, url.c_str());
|
printf("%s: getLiveUrl() [%s] failed!\n", __FUNCTION__, url.c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -954,10 +954,9 @@ bool CMoviePlayerGui::selectLivestream(std::vector<livestream_info_t> &streamLis
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CMoviePlayerGui::getLiveUrl(const t_channel_id chan, const std::string &url, const std::string &script, std::string &realUrl, std::string &_pretty_name, std::string &info1, std::string &info2, std::string &header)
|
bool CMoviePlayerGui::getLiveUrl(const std::string &url, const std::string &script, std::string &realUrl, std::string &_pretty_name, std::string &info1, std::string &info2, std::string &header)
|
||||||
{
|
{
|
||||||
static t_channel_id oldChan = 0;
|
std::vector<livestream_info_t> liveStreamList;
|
||||||
static std::vector<livestream_info_t> liveStreamList;
|
|
||||||
livestream_info_t info;
|
livestream_info_t info;
|
||||||
|
|
||||||
if (script.empty()) {
|
if (script.empty()) {
|
||||||
@@ -986,22 +985,15 @@ bool CMoviePlayerGui::getLiveUrl(const t_channel_id chan, const std::string &url
|
|||||||
|
|
||||||
size_t pos = _script.find(".lua");
|
size_t pos = _script.find(".lua");
|
||||||
if (!file_exists(_script.c_str()) || (pos == std::string::npos) || (_script.length()-pos != 4)) {
|
if (!file_exists(_script.c_str()) || (pos == std::string::npos) || (_script.length()-pos != 4)) {
|
||||||
liveStreamList.clear();
|
|
||||||
printf(">>>>> [%s:%s:%d] script error\n", __file__, __func__, __LINE__);
|
printf(">>>>> [%s:%s:%d] script error\n", __file__, __func__, __LINE__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ((oldChan != chan) || liveStreamList.empty()) {
|
if (!luaGetUrl(_script, url, liveStreamList)) {
|
||||||
liveStreamList.clear();
|
printf(">>>>> [%s:%s:%d] lua script error\n", __file__, __func__, __LINE__);
|
||||||
if (!luaGetUrl(_script, url, liveStreamList)) {
|
return false;
|
||||||
liveStreamList.clear();
|
|
||||||
printf(">>>>> [%s:%s:%d] lua script error\n", __file__, __func__, __LINE__);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
oldChan = chan;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!selectLivestream(liveStreamList, g_settings.livestreamResolution, &info)) {
|
if (!selectLivestream(liveStreamList, g_settings.livestreamResolution, &info)) {
|
||||||
liveStreamList.clear();
|
|
||||||
printf(">>>>> [%s:%s:%d] error selectLivestream\n", __file__, __func__, __LINE__);
|
printf(">>>>> [%s:%s:%d] error selectLivestream\n", __file__, __func__, __LINE__);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -1070,7 +1062,7 @@ bool CMoviePlayerGui::PlayBackgroundStart(const std::string &file, const std::st
|
|||||||
std::string realUrl;
|
std::string realUrl;
|
||||||
std::string _pretty_name = name;
|
std::string _pretty_name = name;
|
||||||
cookie_header.clear();
|
cookie_header.clear();
|
||||||
if (!getLiveUrl(chan, file, script, realUrl, _pretty_name, livestreamInfo1, livestreamInfo2, cookie_header)) {
|
if (!getLiveUrl(file, script, realUrl, _pretty_name, livestreamInfo1, livestreamInfo2, cookie_header)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -269,7 +269,7 @@ class CMoviePlayerGui : public CMenuTarget
|
|||||||
bool getBlockedFromPlugin() { return blockedFromPlugin; };
|
bool getBlockedFromPlugin() { return blockedFromPlugin; };
|
||||||
void setLuaInfoFunc(lua_State* L, bool func) { luaState = L; haveLuaInfoFunc = func; };
|
void setLuaInfoFunc(lua_State* L, bool func) { luaState = L; haveLuaInfoFunc = func; };
|
||||||
void getLivestreamInfo(std::string *i1, std::string *i2) { *i1=livestreamInfo1; *i2=livestreamInfo2; };
|
void getLivestreamInfo(std::string *i1, std::string *i2) { *i1=livestreamInfo1; *i2=livestreamInfo2; };
|
||||||
bool getLiveUrl(const t_channel_id chan, const std::string &url, const std::string &script, std::string &realUrl, std::string &_pretty_name, std::string &info1, std::string &info2, std::string &header);
|
bool getLiveUrl(const std::string &url, const std::string &script, std::string &realUrl, std::string &_pretty_name, std::string &info1, std::string &info2, std::string &header);
|
||||||
|
|
||||||
//NI
|
//NI
|
||||||
MI_MOVIE_INFO * p_movie_info;
|
MI_MOVIE_INFO * p_movie_info;
|
||||||
|
Reference in New Issue
Block a user