mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 15:02:56 +02:00
- imdb/tmdb: more unifications; setTitle()
Conflicts: data/locale/deutsch.locale data/locale/english.locale src/system/locals.h src/system/locals_intern.h Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -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 ...
|
||||
|
@@ -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 ...
|
||||
|
@@ -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");
|
||||
|
||||
|
@@ -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:
|
||||
|
@@ -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;
|
||||
|
@@ -26,10 +26,12 @@
|
||||
|
||||
#include <system/helpers.h>
|
||||
#include <zapit/zapit.h>
|
||||
#include <gui/widget/hintbox.h>
|
||||
|
||||
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); }
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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();
|
||||
|
||||
|
@@ -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,
|
||||
|
@@ -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",
|
||||
|
Reference in New Issue
Block a user