diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index 6fc2a23b4..e0d157757 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -573,7 +573,121 @@ int CEpgData::show_mp(MI_MOVIE_INFO *mp_movie_info, int /*mp_position*/, int /*m #else epgData.contentClassification = 0; #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 ); if(!epgTextSwitch.empty()) mp_movie_info->epgInfo2 = epgTextSwitch; @@ -603,6 +717,8 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start GetEPGData(epg_id, id, &startzeit); epgTextSwitch.clear(); + if (!mp_info) + extMovieInfo.clear(); if (doLoop) { if (!bigFonts && g_settings.bigFonts) { @@ -708,7 +824,6 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start // Add a blank line processTextToArray(""); - // 21.07.2005 - rainerk // Show extended information if ( !epgData.itemDescriptions.empty() && !epgData.items.empty()) { @@ -734,20 +849,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); processTextToArray(std::string(g_Locale->getText(LOCALE_EPGVIEWER_LENGTH)) + ": " + lengthInfo); // UTF-8 - // Show audio information - std::string audioInfo = ""; - CSectionsdClient::ComponentTagList tags; - bool hasComponentTags = CEitManager::getInstance()->getComponentTagsUniqueKey( epgData.eventID, tags); - if (hasComponentTags) + if (!mp_info) { - for (unsigned int i = 0; i < tags.size(); i++) - if (tags[i].streamContent == 2 && !tags[i].component.empty()) - audioInfo += tags[i].component + ", "; - - if (!audioInfo.empty()) + // Show audio information + std::string audioInfo = ""; + CSectionsdClient::ComponentTagList tags; + bool hasComponentTags = CEitManager::getInstance()->getComponentTagsUniqueKey( epgData.eventID, tags); + if (hasComponentTags) { - audioInfo.erase(audioInfo.size()-2); - processTextToArray(std::string(g_Locale->getText(LOCALE_EPGVIEWER_AUDIO)) + ": " + audioInfo); // UTF-8 + for (unsigned int i = 0; i < tags.size(); i++) + 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 + } } } @@ -764,13 +882,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 // -- 2002-05-03 rasc has_follow_screenings = false; - if (hasFollowScreenings(channel_id, epgData.title)) { + if (!mp_info && hasFollowScreenings(channel_id, epgData.title)) { processTextToArray(""); // UTF-8 processTextToArray(std::string(g_Locale->getText(LOCALE_EPGVIEWER_MORE_SCREENINGS)) + ':'); // UTF-8 FollowScreenings(channel_id, epgData.title); has_follow_screenings = true; } + // show extended movie info + if (mp_info && !extMovieInfo.empty()) + processTextToArray(extMovieInfo); + COSDFader fader(g_settings.theme.menu_Content_alpha); fader.StartFadeIn(); diff --git a/src/gui/epgview.h b/src/gui/epgview.h index 22aa768ef..e658dff8e 100644 --- a/src/gui/epgview.h +++ b/src/gui/epgview.h @@ -84,6 +84,7 @@ class CEpgData std::vector epgText; std::vector epgText_saved; std::string epgTextSwitch; + std::string extMovieInfo; int topheight,topboxheight; int buttonheight,botboxheight; int medlineheight,medlinecount; diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp index 5d86516da..b9b4b3a6d 100644 --- a/src/gui/moviebrowser.cpp +++ b/src/gui/moviebrowser.cpp @@ -2046,11 +2046,8 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg) { if (m_movieSelectionHandler != NULL) { - framebuffer->paintBackground(); //NI - if (m_settings.gui == MB_GUI_MOVIE_INFO && m_windowFocus == MB_FOCUS_MOVIE_INFO) - g_EpgData->show_mp(m_movieSelectionHandler,0,0); - else - m_movieInfo.showMovieInfo(*m_movieSelectionHandler); + framebuffer->paintBackground(); //clear whole screen + g_EpgData->show_mp(m_movieSelectionHandler, 0, 0); refresh(); } } diff --git a/src/gui/movieinfo.cpp b/src/gui/movieinfo.cpp index 0c8818c0b..b335a3f44 100644 --- a/src/gui/movieinfo.cpp +++ b/src/gui/movieinfo.cpp @@ -397,6 +397,7 @@ bool CMovieInfo::parseXmlTree(char */*text*/, MI_MOVIE_INFO * /*movie_info*/) /************************************************************************ ************************************************************************/ +#if 0 void CMovieInfo::showMovieInfo(MI_MOVIE_INFO & movie_info) { std::string print_buffer = movie_info.epgInfo1; @@ -870,7 +871,7 @@ bool CMovieInfo::parseXmlQuickFix(std::string &_text, MI_MOVIE_INFO * movie_info #endif return (false); } - +#endif /************************************************************************ ************************************************************************/ diff --git a/src/gui/movieinfo.h b/src/gui/movieinfo.h index 368322c88..c03cbbd9f 100644 --- a/src/gui/movieinfo.h +++ b/src/gui/movieinfo.h @@ -204,7 +204,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 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 +#if 0 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) 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 diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index ad8eef431..1eb27a41f 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -2194,7 +2194,7 @@ void CMoviePlayerGui::handleMovieBrowser(neutrino_msg_t msg, int /*position*/) CLuaInstVideo::getInstance()->execLuaInfoFunc(luaState, xres, yres, aspectRatio, framerate); } else if (p_movie_info) - cMovieInfo.showMovieInfo(*p_movie_info); + g_EpgData->show_mp(p_movie_info,0,0); CInfoClock::getInstance()->enableInfoClock(true); InfoIcons->enableInfoIcons(true); //NI InfoIcons