imdb: show english title in txt-field to get more space for data

Origin commit data
------------------
Branch: ni/coolstream
Commit: 1b902ebdae
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-07-31 (Sun, 31 Jul 2016)

Origin message was:
------------------
- imdb: show english title in txt-field to get more space for data

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2016-07-31 22:54:16 +02:00
parent 3922e6e76e
commit 6afdf0f9e7
2 changed files with 8 additions and 11 deletions

View File

@@ -1524,20 +1524,15 @@ int CEpgData::showIMDb(int ypos, bool splash)
int sx_h = sx+10+poster_w+(poster_w != 0 ? 10 : 0); // startpos int sx_h = sx+10+poster_w+(poster_w != 0 ? 10 : 0); // startpos
int ox_h = ox-10-poster_w-(poster_w != 0 ? 10 : 0)-10; // width int ox_h = ox-10-poster_w-(poster_w != 0 ? 10 : 0)-10; // width
// clear epg array and add some blank lines // clear epg array
epgText_saved = epgText; epgText_saved = epgText;
epgText.clear(); epgText.clear();
processTextToArray("\n");
processTextToArray(" "); //must be a space here
//data //data
txt.clear(); txt.clear();
imdb->getIMDbData(txt); imdb->getIMDbData(txt);
processTextToArray(txt); processTextToArray(txt);
showText(0, y); showText(0, y+medlineheight);
//paint title
fontIMDb->RenderString(sx+10, y+medlineheight, ox-10, title, COL_MENUCONTENT_TEXT, 0, true);
//rating //rating
txt = "imdbRating"; txt = "imdbRating";
@@ -1558,15 +1553,15 @@ int CEpgData::showIMDb(int ypos, bool splash)
g_PicViewer->getSize(imdb->stars_bg.c_str(), &stars_w, &stars_h); g_PicViewer->getSize(imdb->stars_bg.c_str(), &stars_w, &stars_h);
int aktiv = stars_w * atoi(pgvalue.c_str()) / (atoi(pgvalue.c_str())<10?10.0:100.0); int aktiv = stars_w * atoi(pgvalue.c_str()) / (atoi(pgvalue.c_str())<10?10.0:100.0);
g_PicViewer->DisplayImage(imdb->stars_bg.c_str(), sx_h, y+(2*medlineheight)+((medlineheight/2)-(stars_h/2)), stars_w, stars_h); g_PicViewer->DisplayImage(imdb->stars_bg.c_str(), sx_h, y+((medlineheight/2)-(stars_h/2)), stars_w, stars_h);
if(pgvalue != "0") if(pgvalue != "0")
g_PicViewer->DisplayImage_unscaled(imdb->stars.c_str(), sx_h, y+(2*medlineheight)+((medlineheight/2)-(stars_h/2)), aktiv, stars_h); g_PicViewer->DisplayImage_unscaled(imdb->stars.c_str(), sx_h, y+((medlineheight/2)-(stars_h/2)), aktiv, stars_h);
fontIMDb->RenderString(sx_h+stars_w+10, y+(3*medlineheight), ox_h-stars_w-10, txt, COL_MENUCONTENT_TEXT, 0, true); // UTF-8 fontIMDb->RenderString(sx_h+stars_w+10, y+(medlineheight), ox_h-stars_w-10, txt, COL_MENUCONTENT_TEXT, 0, true); // UTF-8
//paint poster //paint poster
if ((poster_w != 0) && (poster_h != 0)) if ((poster_w != 0) && (poster_h != 0))
g_PicViewer->DisplayImage(imdb->posterfile.c_str(), sx+10, y+(2*medlineheight), poster_w, poster_h, frameBuffer->TM_NONE); g_PicViewer->DisplayImage(imdb->posterfile.c_str(), sx+10, y, poster_w, poster_h, frameBuffer->TM_NONE);
return 0; return 0;
} }

View File

@@ -329,6 +329,8 @@ int CIMDB::getIMDb(const std::string& epgTitle)
void CIMDB::getIMDbData(std::string& txt) void CIMDB::getIMDbData(std::string& txt)
{ {
//TODO: localize
txt += "Englischer Titel: "+m["Title"]+"\n";
txt += "Metascore: "+m["Metascore"]+(m["Metascore"] == "N/A" ? "\n" : "/100\n"); txt += "Metascore: "+m["Metascore"]+(m["Metascore"] == "N/A" ? "\n" : "/100\n");
txt += "Stimmen: "+m["imdbVotes"]+"\n"; txt += "Stimmen: "+m["imdbVotes"]+"\n";
txt += "Datum: "+m["Released"]+" | "+m["Country"]+" | "+m["Runtime"]+"\n"; txt += "Datum: "+m["Released"]+" | "+m["Country"]+" | "+m["Runtime"]+"\n";