diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 98bf8ad53..93a7ec645 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1027,6 +1027,7 @@ imdb.data_website Webseite imdb.data_writer Drehbuchautor imdb.info IMDb-Info imdb.info_save Bild speichern +imdb.read_data Suche IMDb-Daten ... inetradio.autostart Internetradio Auto-Start inetradio.name Internetradio infoviewer.epgnotload Informationen noch nicht geladen ... diff --git a/data/locale/english.locale b/data/locale/english.locale index 0de5976cf..251b9872c 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1027,7 +1027,8 @@ imdb.data_website Website imdb.data_writer Screenplay author imdb.info IMDb-Info imdb.info_save save Cover -inetradio.autostart Internetradio Auto-Start +imdb.read_data Search IMDb data ... +inetradio.autostart Internetradio auto-start inetradio.name Internetradio infoviewer.epgnotload EPG not loaded ... infoviewer.epgwait waiting for EPG ... diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index c0f7d90da..eb212c11d 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -1199,8 +1199,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start { //show IMDb info imdb_active = true; - showIMDb(true); //show splashscreen only - imdb->getMovieDetails(epgData.title); + imdb->setTitle(epgData.title); showIMDb(); showTimerEventBar(true, !mp_info && isCurrentEPG(channel_id), mp_info); //show buttons timeoutEnd = CRCInput::calcTimeoutEnd(timeout); @@ -1640,17 +1639,8 @@ void CEpgData::showTimerEventBar (bool pshow, bool adzap, bool mp_info) } //imdb start -int CEpgData::showIMDb(bool splash) +int CEpgData::showIMDb() { - fontIMDb = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]; - - frameBuffer->paintBoxRel(sx, sy+toph, ox /*- 15*/, sb, COL_MENUCONTENT_PLUS_0); - if (splash) - { - fontIMDb->RenderString(sx+OFFSET_INNER_MID, sy+toph+medlineheight, ox-OFFSET_INNER_MID, "IMDb: Daten werden geladen ...", COL_MENUCONTENT_TEXT, 0, true); - return 0; - } - //title std::string title = imdb->getIMDbElement("Title"); diff --git a/src/gui/epgview.h b/src/gui/epgview.h index fa6c6d347..1b6c68690 100644 --- a/src/gui/epgview.h +++ b/src/gui/epgview.h @@ -107,7 +107,7 @@ class CEpgData std::string imdb_rating; std::string epg_title; std::string movie_filename; - int showIMDb(bool splash = false); + int showIMDb(); Font *fontIMDb; public: diff --git a/src/gui/mdb-imdb.cpp b/src/gui/mdb-imdb.cpp index b639b5da2..3cc4421dd 100644 --- a/src/gui/mdb-imdb.cpp +++ b/src/gui/mdb-imdb.cpp @@ -50,7 +50,8 @@ CIMDB *CIMDB::getInstance() CIMDB::CIMDB() { - key = g_settings.omdb_api_key; + key = g_settings.omdb_api_key; + hintbox = NULL; search_url = "http://www.google.de/search?q="; search_outfile = "/tmp/google.out"; search_error = "IMDb: Google download failed"; @@ -66,6 +67,21 @@ CIMDB::~CIMDB() cleanup(); } +void CIMDB::setTitle(std::string epgtitle) +{ + hintbox = new CHintBox(LOCALE_MESSAGEBOX_INFO, LOCALE_IMDB_READ_DATA); + hintbox->paint(); + + getMovieDetails(epgtitle); + + if (hintbox) + { + hintbox->hide(); + delete hintbox; + hintbox = NULL; + } +} + std::string CIMDB::utf82url(std::string s) { std::stringstream ss; diff --git a/src/gui/mdb-imdb.h b/src/gui/mdb-imdb.h index ddac3d4c2..99f6b4cbb 100644 --- a/src/gui/mdb-imdb.h +++ b/src/gui/mdb-imdb.h @@ -26,10 +26,12 @@ #include #include +#include class CIMDB { private: + CHintBox *hintbox; int acc; std::string imdb_url; std::string key; // omdb api key @@ -46,6 +48,9 @@ class CIMDB CIMDB(); ~CIMDB(); static CIMDB *getInstance(); + void setTitle(std::string epgtitle); + std::string getEPGText(); + std::string getMovieText(); std::string search_url; std::string search_outfile; @@ -58,9 +63,6 @@ class CIMDB void StringReplace(std::string &str, const std::string search, const std::string rstr); void cleanup(); - std::string getEPGText(); - std::string getMovieText(); - std::string getPoster() { return posterfile; } bool hasPoster() { return (access(posterfile.c_str(), F_OK) == 0); } diff --git a/src/gui/mdb-tmdb.cpp b/src/gui/mdb-tmdb.cpp index 822dc9130..5318067d3 100644 --- a/src/gui/mdb-tmdb.cpp +++ b/src/gui/mdb-tmdb.cpp @@ -70,7 +70,7 @@ void CTMDB::setTitle(std::string epgtitle) { minfo.epgtitle = epgtitle; - hintbox = new CHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_TMDB_READ_DATA)); + hintbox = new CHintBox(LOCALE_MESSAGEBOX_INFO, LOCALE_TMDB_READ_DATA); hintbox->paint(); std::string lang = Lang2ISO639_1(g_settings.language); diff --git a/src/gui/mdb-tmdb.h b/src/gui/mdb-tmdb.h index 5b27ddd20..685f1e337 100644 --- a/src/gui/mdb-tmdb.h +++ b/src/gui/mdb-tmdb.h @@ -62,7 +62,7 @@ class CTMDB CTMDB(); ~CTMDB(); static CTMDB *getInstance(); - void setTitle(std::string epgtitle); + void setTitle(std::string epgtitle); std::string getEPGText(); std::string getMovieText(); diff --git a/src/system/locals.h b/src/system/locals.h index ce938ff56..bb140b043 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1054,6 +1054,7 @@ typedef enum LOCALE_IMDB_DATA_WRITER, LOCALE_IMDB_INFO, LOCALE_IMDB_INFO_SAVE, + LOCALE_IMDB_READ_DATA, LOCALE_INETRADIO_AUTOSTART, LOCALE_INETRADIO_NAME, LOCALE_INFOVIEWER_EPGNOTLOAD, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 08dffd331..4d43ab83d 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1054,6 +1054,7 @@ const char * locale_real_names[] = "imdb.data_writer", "imdb.info", "imdb.info_save", + "imdb.read_data", "inetradio.autostart", "inetradio.name", "infoviewer.epgnotload",