mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 09:21:09 +02:00
CLuaInstance: Add parameter info1/info2 to PlayFile()
- This parameter display in info viewer instead of epg data
Origin commit data
------------------
Branch: ni/coolstream
Commit: b6f1963f2c
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2014-09-10 (Wed, 10 Sep 2014)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -612,14 +612,22 @@ int CLuaInstance::PlayFile(lua_State *L)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
const char *title;
|
const char *title;
|
||||||
|
const char *info1 = "";
|
||||||
|
const char *info2 = "";
|
||||||
const char *fname;
|
const char *fname;
|
||||||
|
|
||||||
title = luaL_checkstring(L, 2);
|
title = luaL_checkstring(L, 2);
|
||||||
fname = luaL_checkstring(L, 3);
|
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);
|
printf("CLuaInstance::%s: title %s file %s\n", __func__, title, fname);
|
||||||
std::string st(title);
|
std::string st(title);
|
||||||
|
std::string si1(info1);
|
||||||
|
std::string si2(info2);
|
||||||
std::string sf(fname);
|
std::string sf(fname);
|
||||||
CMoviePlayerGui::getInstance().SetFile(st, sf);
|
CMoviePlayerGui::getInstance().SetFile(st, sf, si1, si2);
|
||||||
CMoviePlayerGui::getInstance().exec(NULL, "http");
|
CMoviePlayerGui::getInstance().exec(NULL, "http");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -158,6 +158,8 @@ void CMoviePlayerGui::Init(void)
|
|||||||
ext_subs = false;
|
ext_subs = false;
|
||||||
iso_file = false;
|
iso_file = false;
|
||||||
bgThread = 0;
|
bgThread = 0;
|
||||||
|
info_1 = "";
|
||||||
|
info_2 = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMoviePlayerGui::cutNeutrino()
|
void CMoviePlayerGui::cutNeutrino()
|
||||||
@@ -1034,7 +1036,7 @@ void CMoviePlayerGui::callInfoViewer(/*const int duration, const int curr_pos*/)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* not moviebrowser => use the filename as title */
|
/* 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)
|
bool CMoviePlayerGui::getAudioName(int apid, std::string &apidtitle)
|
||||||
|
@@ -73,6 +73,7 @@ class CMoviePlayerGui : public CMenuTarget
|
|||||||
|
|
||||||
std::string file_name;
|
std::string file_name;
|
||||||
std::string pretty_name;
|
std::string pretty_name;
|
||||||
|
std::string info_1, info_2;
|
||||||
std::string currentaudioname;
|
std::string currentaudioname;
|
||||||
bool playing;
|
bool playing;
|
||||||
bool time_forced;
|
bool time_forced;
|
||||||
@@ -186,7 +187,7 @@ class CMoviePlayerGui : public CMenuTarget
|
|||||||
void UpdatePosition();
|
void UpdatePosition();
|
||||||
int timeshift;
|
int timeshift;
|
||||||
int file_prozent;
|
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);
|
bool PlayBackgroundStart(const std::string &file, const std::string &name, t_channel_id chan);
|
||||||
void stopPlayBack(void);
|
void stopPlayBack(void);
|
||||||
void setLastMode(int m) { m_LastMode = m; }
|
void setLastMode(int m) { m_LastMode = m; }
|
||||||
|
Reference in New Issue
Block a user