mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 07:51:19 +02:00
- epgview: add extended movie info; code from movieinfo.cpp
comment out unused showMovieInfo() in movieinfo.cpp
This commit is contained in:
@@ -529,7 +529,121 @@ int CEpgData::show_mp(MI_MOVIE_INFO *mp_movie_info, int /*mp_position*/, int /*m
|
|||||||
#else
|
#else
|
||||||
epgData.contentClassification = 0;
|
epgData.contentClassification = 0;
|
||||||
#endif
|
#endif
|
||||||
epgData.epg_times.dauer = mp_movie_info->length;
|
epgData.epg_times.dauer = mp_movie_info->length * 60; // we need the seconds
|
||||||
|
|
||||||
|
extMovieInfo.clear();
|
||||||
|
if ( !mp_movie_info->productionCountry.empty() || mp_movie_info->productionDate != 0)
|
||||||
|
{
|
||||||
|
extMovieInfo += mp_movie_info->productionCountry;
|
||||||
|
extMovieInfo += to_string(mp_movie_info->productionDate + 1900);
|
||||||
|
extMovieInfo += "\n";
|
||||||
|
}
|
||||||
|
if (!mp_movie_info->serieName.empty())
|
||||||
|
{
|
||||||
|
extMovieInfo += "\n";
|
||||||
|
extMovieInfo += g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_SERIE);
|
||||||
|
extMovieInfo += ": ";
|
||||||
|
extMovieInfo += mp_movie_info->serieName;
|
||||||
|
extMovieInfo += "\n";
|
||||||
|
}
|
||||||
|
if (!mp_movie_info->epgChannel.empty())
|
||||||
|
{
|
||||||
|
extMovieInfo += "\n";
|
||||||
|
extMovieInfo += g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_CHANNEL);
|
||||||
|
extMovieInfo += ": ";
|
||||||
|
extMovieInfo += mp_movie_info->epgChannel;
|
||||||
|
extMovieInfo += "\n";
|
||||||
|
}
|
||||||
|
if (mp_movie_info->rating != 0)
|
||||||
|
{
|
||||||
|
extMovieInfo += g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_RATING);
|
||||||
|
extMovieInfo += ": ";
|
||||||
|
extMovieInfo += to_string(mp_movie_info->rating / 10);
|
||||||
|
extMovieInfo += ",";
|
||||||
|
extMovieInfo += to_string(mp_movie_info->rating % 10);
|
||||||
|
extMovieInfo += "/10";
|
||||||
|
extMovieInfo += "\n";
|
||||||
|
}
|
||||||
|
if (mp_movie_info->quality != 0)
|
||||||
|
{
|
||||||
|
extMovieInfo += g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_QUALITY);
|
||||||
|
extMovieInfo += ": ";
|
||||||
|
extMovieInfo += to_string(mp_movie_info->quality);
|
||||||
|
extMovieInfo += "\n";
|
||||||
|
}
|
||||||
|
if (mp_movie_info->parentalLockAge != 0)
|
||||||
|
{
|
||||||
|
extMovieInfo += g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_PARENTAL_LOCKAGE);
|
||||||
|
extMovieInfo += ": ";
|
||||||
|
extMovieInfo += to_string(mp_movie_info->parentalLockAge);
|
||||||
|
extMovieInfo += " ";
|
||||||
|
extMovieInfo += g_Locale->getText(LOCALE_UNIT_LONG_YEARS);
|
||||||
|
extMovieInfo += "\n";
|
||||||
|
}
|
||||||
|
if (!mp_movie_info->audioPids.empty())
|
||||||
|
{
|
||||||
|
extMovieInfo += g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_AUDIO);
|
||||||
|
extMovieInfo += ": ";
|
||||||
|
for (unsigned int i = 0; i < mp_movie_info->audioPids.size(); i++)
|
||||||
|
{
|
||||||
|
if (i)
|
||||||
|
extMovieInfo += ", ";
|
||||||
|
extMovieInfo += mp_movie_info->audioPids[i].epgAudioPidName;
|
||||||
|
}
|
||||||
|
extMovieInfo += "\n";
|
||||||
|
}
|
||||||
|
if (mp_movie_info->genreMajor != 0)
|
||||||
|
{
|
||||||
|
neutrino_locale_t locale_genre;
|
||||||
|
unsigned char i = (mp_movie_info->genreMajor & 0x0F0);
|
||||||
|
if (i >= 0x010 && i < 0x0B0)
|
||||||
|
{
|
||||||
|
i >>= 4;
|
||||||
|
i--;
|
||||||
|
locale_genre = genre_sub_classes_list[i][((mp_movie_info->genreMajor & 0x0F) < genre_sub_classes[i]) ? (mp_movie_info->genreMajor & 0x0F) : 0];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
locale_genre = LOCALE_GENRE_UNKNOWN;
|
||||||
|
extMovieInfo += g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_GENRE_MAJOR);
|
||||||
|
extMovieInfo += ": ";
|
||||||
|
extMovieInfo += g_Locale->getText(locale_genre);
|
||||||
|
extMovieInfo += "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
extMovieInfo += "\n";
|
||||||
|
|
||||||
|
tm *date_tm = localtime(&mp_movie_info->dateOfLastPlay);
|
||||||
|
extMovieInfo += g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_PREVPLAYDATE);
|
||||||
|
extMovieInfo += ": ";
|
||||||
|
extMovieInfo += strftime("%F", date_tm);
|
||||||
|
extMovieInfo += "\n";
|
||||||
|
|
||||||
|
date_tm = localtime(&mp_movie_info->file.Time);
|
||||||
|
extMovieInfo += g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_RECORDDATE);
|
||||||
|
extMovieInfo += ": ";
|
||||||
|
extMovieInfo += strftime("%F", date_tm);
|
||||||
|
extMovieInfo += "\n";
|
||||||
|
|
||||||
|
extMovieInfo += "\n";
|
||||||
|
|
||||||
|
if (mp_movie_info->file.Size != 0)
|
||||||
|
{
|
||||||
|
extMovieInfo += g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_SIZE);
|
||||||
|
extMovieInfo += ": ";
|
||||||
|
extMovieInfo += to_string(mp_movie_info->file.Size >> 20);
|
||||||
|
extMovieInfo += "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
extMovieInfo += g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_PATH);
|
||||||
|
extMovieInfo += ": ";
|
||||||
|
extMovieInfo += mp_movie_info->file.getPath();
|
||||||
|
extMovieInfo += "\n";
|
||||||
|
|
||||||
|
extMovieInfo += g_Locale->getText(LOCALE_MOVIEBROWSER_INFO_FILE);
|
||||||
|
extMovieInfo += ": ";
|
||||||
|
extMovieInfo += mp_movie_info->file.getFileName();
|
||||||
|
extMovieInfo += "\n";
|
||||||
|
|
||||||
res = show(mp_movie_info->epgEpgId >>16, 0, 0, doLoop, false,true );
|
res = show(mp_movie_info->epgEpgId >>16, 0, 0, doLoop, false,true );
|
||||||
if(!epgTextSwitch.empty())
|
if(!epgTextSwitch.empty())
|
||||||
mp_movie_info->epgInfo2 = epgTextSwitch;
|
mp_movie_info->epgInfo2 = epgTextSwitch;
|
||||||
@@ -559,6 +673,8 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
|||||||
GetEPGData(epg_id, id, &startzeit);
|
GetEPGData(epg_id, id, &startzeit);
|
||||||
|
|
||||||
epgTextSwitch.clear();
|
epgTextSwitch.clear();
|
||||||
|
if (!mp_info)
|
||||||
|
extMovieInfo.clear();
|
||||||
if (doLoop)
|
if (doLoop)
|
||||||
{
|
{
|
||||||
if (!bigFonts && g_settings.bigFonts) {
|
if (!bigFonts && g_settings.bigFonts) {
|
||||||
@@ -664,7 +780,6 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
|||||||
// Add a blank line
|
// Add a blank line
|
||||||
processTextToArray("");
|
processTextToArray("");
|
||||||
|
|
||||||
|
|
||||||
// 21.07.2005 - rainerk
|
// 21.07.2005 - rainerk
|
||||||
// Show extended information
|
// Show extended information
|
||||||
if ( !epgData.itemDescriptions.empty() && !epgData.items.empty()) {
|
if ( !epgData.itemDescriptions.empty() && !epgData.items.empty()) {
|
||||||
@@ -690,20 +805,23 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
|||||||
sprintf(lengthInfo, "%d", epgData.epg_times.dauer / 60);
|
sprintf(lengthInfo, "%d", epgData.epg_times.dauer / 60);
|
||||||
processTextToArray(std::string(g_Locale->getText(LOCALE_EPGVIEWER_LENGTH)) + ": " + lengthInfo); // UTF-8
|
processTextToArray(std::string(g_Locale->getText(LOCALE_EPGVIEWER_LENGTH)) + ": " + lengthInfo); // UTF-8
|
||||||
|
|
||||||
// Show audio information
|
if (!mp_info)
|
||||||
std::string audioInfo = "";
|
|
||||||
CSectionsdClient::ComponentTagList tags;
|
|
||||||
bool hasComponentTags = CEitManager::getInstance()->getComponentTagsUniqueKey( epgData.eventID, tags);
|
|
||||||
if (hasComponentTags)
|
|
||||||
{
|
{
|
||||||
for (unsigned int i = 0; i < tags.size(); i++)
|
// Show audio information
|
||||||
if (tags[i].streamContent == 2 && !tags[i].component.empty())
|
std::string audioInfo = "";
|
||||||
audioInfo += tags[i].component + ", ";
|
CSectionsdClient::ComponentTagList tags;
|
||||||
|
bool hasComponentTags = CEitManager::getInstance()->getComponentTagsUniqueKey( epgData.eventID, tags);
|
||||||
if (!audioInfo.empty())
|
if (hasComponentTags)
|
||||||
{
|
{
|
||||||
audioInfo.erase(audioInfo.size()-2);
|
for (unsigned int i = 0; i < tags.size(); i++)
|
||||||
processTextToArray(std::string(g_Locale->getText(LOCALE_EPGVIEWER_AUDIO)) + ": " + audioInfo); // UTF-8
|
if (tags[i].streamContent == 2 && !tags[i].component.empty())
|
||||||
|
audioInfo += tags[i].component + ", ";
|
||||||
|
|
||||||
|
if (!audioInfo.empty())
|
||||||
|
{
|
||||||
|
audioInfo.erase(audioInfo.size()-2);
|
||||||
|
processTextToArray(std::string(g_Locale->getText(LOCALE_EPGVIEWER_AUDIO)) + ": " + audioInfo); // UTF-8
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -720,13 +838,17 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
|||||||
// -- display more screenings on the same channel
|
// -- display more screenings on the same channel
|
||||||
// -- 2002-05-03 rasc
|
// -- 2002-05-03 rasc
|
||||||
has_follow_screenings = false;
|
has_follow_screenings = false;
|
||||||
if (hasFollowScreenings(channel_id, epgData.title)) {
|
if (!mp_info && hasFollowScreenings(channel_id, epgData.title)) {
|
||||||
processTextToArray(""); // UTF-8
|
processTextToArray(""); // UTF-8
|
||||||
processTextToArray(std::string(g_Locale->getText(LOCALE_EPGVIEWER_MORE_SCREENINGS)) + ':'); // UTF-8
|
processTextToArray(std::string(g_Locale->getText(LOCALE_EPGVIEWER_MORE_SCREENINGS)) + ':'); // UTF-8
|
||||||
FollowScreenings(channel_id, epgData.title);
|
FollowScreenings(channel_id, epgData.title);
|
||||||
has_follow_screenings = true;
|
has_follow_screenings = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// show extended movie info
|
||||||
|
if (mp_info && !extMovieInfo.empty())
|
||||||
|
processTextToArray(extMovieInfo);
|
||||||
|
|
||||||
COSDFader fader(g_settings.theme.menu_Content_alpha);
|
COSDFader fader(g_settings.theme.menu_Content_alpha);
|
||||||
fader.StartFadeIn();
|
fader.StartFadeIn();
|
||||||
|
|
||||||
|
@@ -81,6 +81,7 @@ class CEpgData
|
|||||||
std::vector<epg_pair> epgText;
|
std::vector<epg_pair> epgText;
|
||||||
std::vector<epg_pair> epgText_saved;
|
std::vector<epg_pair> epgText_saved;
|
||||||
std::string epgTextSwitch;
|
std::string epgTextSwitch;
|
||||||
|
std::string extMovieInfo;
|
||||||
int topheight,topboxheight;
|
int topheight,topboxheight;
|
||||||
int buttonheight,botboxheight;
|
int buttonheight,botboxheight;
|
||||||
int medlineheight,medlinecount;
|
int medlineheight,medlinecount;
|
||||||
|
@@ -1949,10 +1949,8 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg)
|
|||||||
{
|
{
|
||||||
if (m_movieSelectionHandler != NULL)
|
if (m_movieSelectionHandler != NULL)
|
||||||
{
|
{
|
||||||
if (m_settings.gui == MB_GUI_MOVIE_INFO && m_windowFocus == MB_FOCUS_MOVIE_INFO)
|
framebuffer->paintBackground(); //clear whole screen
|
||||||
g_EpgData->show_mp(m_movieSelectionHandler,0,0);
|
g_EpgData->show_mp(m_movieSelectionHandler, 0, 0);
|
||||||
else
|
|
||||||
m_movieInfo.showMovieInfo(*m_movieSelectionHandler);
|
|
||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -395,6 +395,7 @@ bool CMovieInfo::parseXmlTree(char */*text*/, MI_MOVIE_INFO * /*movie_info*/)
|
|||||||
/************************************************************************
|
/************************************************************************
|
||||||
|
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
#if 0
|
||||||
void CMovieInfo::showMovieInfo(MI_MOVIE_INFO & movie_info)
|
void CMovieInfo::showMovieInfo(MI_MOVIE_INFO & movie_info)
|
||||||
{
|
{
|
||||||
std::string print_buffer = movie_info.epgInfo1;
|
std::string print_buffer = movie_info.epgInfo1;
|
||||||
@@ -818,7 +819,7 @@ bool CMovieInfo::parseXmlQuickFix(std::string &_text, MI_MOVIE_INFO * movie_info
|
|||||||
#endif
|
#endif
|
||||||
return (false);
|
return (false);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
|
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
@@ -202,7 +202,9 @@ class CMovieInfo
|
|||||||
bool loadMovieInfo(MI_MOVIE_INFO* movie_info, CFile* file = NULL ); // load movie information for the given .xml filename. If there is no filename, the filename (ts) from movie_info is converted to xml and used instead
|
bool loadMovieInfo(MI_MOVIE_INFO* movie_info, CFile* file = NULL ); // load movie information for the given .xml filename. If there is no filename, the filename (ts) from movie_info is converted to xml and used instead
|
||||||
bool encodeMovieInfoXml(std::string* extMessage, MI_MOVIE_INFO * movie_info); // encode the movie_info structure to xml string
|
bool encodeMovieInfoXml(std::string* extMessage, MI_MOVIE_INFO * movie_info); // encode the movie_info structure to xml string
|
||||||
bool saveMovieInfo(MI_MOVIE_INFO& movie_info, CFile* file = NULL ); // encode the movie_info structure to xml and save it to the given .xml filename. If there is no filename, the filename (ts) from movie_info is converted to xml and used instead
|
bool saveMovieInfo(MI_MOVIE_INFO& movie_info, CFile* file = NULL ); // encode the movie_info structure to xml and save it to the given .xml filename. If there is no filename, the filename (ts) from movie_info is converted to xml and used instead
|
||||||
|
#if 0
|
||||||
void showMovieInfo(MI_MOVIE_INFO& movie_info); // open a Hintbox and show the movie info
|
void showMovieInfo(MI_MOVIE_INFO& movie_info); // open a Hintbox and show the movie info
|
||||||
|
#endif
|
||||||
void printDebugMovieInfo(MI_MOVIE_INFO& movie_info); // print movie info on debug channel (RS232)
|
void printDebugMovieInfo(MI_MOVIE_INFO& movie_info); // print movie info on debug channel (RS232)
|
||||||
bool addNewBookmark(MI_MOVIE_INFO* movie_info,MI_BOOKMARK &new_bookmark); // add a new bookmark to the given movie info. If there is no space false is returned
|
bool addNewBookmark(MI_MOVIE_INFO* movie_info,MI_BOOKMARK &new_bookmark); // add a new bookmark to the given movie info. If there is no space false is returned
|
||||||
|
|
||||||
|
@@ -2160,7 +2160,7 @@ void CMoviePlayerGui::handleMovieBrowser(neutrino_msg_t msg, int /*position*/)
|
|||||||
CLuaInstVideo::getInstance()->execLuaInfoFunc(luaState, xres, yres, aspectRatio, framerate);
|
CLuaInstVideo::getInstance()->execLuaInfoFunc(luaState, xres, yres, aspectRatio, framerate);
|
||||||
}
|
}
|
||||||
else if (p_movie_info)
|
else if (p_movie_info)
|
||||||
cMovieInfo.showMovieInfo(*p_movie_info);
|
g_EpgData->show_mp(p_movie_info,0,0);
|
||||||
|
|
||||||
CInfoClock::getInstance()->enableInfoClock(true);
|
CInfoClock::getInstance()->enableInfoClock(true);
|
||||||
if (restore) {
|
if (restore) {
|
||||||
|
Reference in New Issue
Block a user