mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 01:11:12 +02:00
CLuaInstance: Add parameter info1/info2 to PlayFile()
- This parameter display in info viewer instead of epg data
This commit is contained in:
@@ -612,14 +612,22 @@ int CLuaInstance::PlayFile(lua_State *L)
|
||||
return 0;
|
||||
}
|
||||
const char *title;
|
||||
const char *info1 = "";
|
||||
const char *info2 = "";
|
||||
const char *fname;
|
||||
|
||||
title = luaL_checkstring(L, 2);
|
||||
fname = luaL_checkstring(L, 3);
|
||||
if (numargs > 3)
|
||||
info1 = luaL_checkstring(L, 4);
|
||||
if (numargs > 4)
|
||||
info2 = luaL_checkstring(L, 5);
|
||||
printf("CLuaInstance::%s: title %s file %s\n", __func__, title, fname);
|
||||
std::string st(title);
|
||||
std::string si1(info1);
|
||||
std::string si2(info2);
|
||||
std::string sf(fname);
|
||||
CMoviePlayerGui::getInstance().SetFile(st, sf);
|
||||
CMoviePlayerGui::getInstance().SetFile(st, sf, si1, si2);
|
||||
CMoviePlayerGui::getInstance().exec(NULL, "http");
|
||||
return 0;
|
||||
}
|
||||
|
@@ -158,6 +158,8 @@ void CMoviePlayerGui::Init(void)
|
||||
ext_subs = false;
|
||||
iso_file = false;
|
||||
bgThread = 0;
|
||||
info_1 = "";
|
||||
info_2 = "";
|
||||
}
|
||||
|
||||
void CMoviePlayerGui::cutNeutrino()
|
||||
@@ -1034,7 +1036,7 @@ void CMoviePlayerGui::callInfoViewer(/*const int duration, const int curr_pos*/)
|
||||
}
|
||||
|
||||
/* not moviebrowser => use the filename as title */
|
||||
g_InfoViewer->showMovieTitle(playstate, 0, pretty_name, "", "", duration, position);
|
||||
g_InfoViewer->showMovieTitle(playstate, 0, pretty_name, info_1, info_2, duration, position);
|
||||
}
|
||||
|
||||
bool CMoviePlayerGui::getAudioName(int apid, std::string &apidtitle)
|
||||
|
@@ -73,6 +73,7 @@ class CMoviePlayerGui : public CMenuTarget
|
||||
|
||||
std::string file_name;
|
||||
std::string pretty_name;
|
||||
std::string info_1, info_2;
|
||||
std::string currentaudioname;
|
||||
bool playing;
|
||||
bool time_forced;
|
||||
@@ -186,7 +187,7 @@ class CMoviePlayerGui : public CMenuTarget
|
||||
void UpdatePosition();
|
||||
int timeshift;
|
||||
int file_prozent;
|
||||
void SetFile(std::string &name, std::string &file) { pretty_name = name; file_name = file; }
|
||||
void SetFile(std::string &name, std::string &file, std::string info1="", std::string info2="") { pretty_name = name; file_name = file; info_1 = info1; info_2 = info2; }
|
||||
bool PlayBackgroundStart(const std::string &file, const std::string &name, t_channel_id chan);
|
||||
void stopPlayBack(void);
|
||||
void setLastMode(int m) { m_LastMode = m; }
|
||||
|
Reference in New Issue
Block a user