mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
add option to replace EPG Info with tmdb Info - be careful
This commit is contained in:
committed by
Jacek Jendrzej
parent
98640e1b1f
commit
7aa3656b14
@@ -491,6 +491,7 @@ int CEpgData::show_mp(MI_MOVIE_INFO *mp_movie_info, int mp_position, int mp_dura
|
|||||||
{
|
{
|
||||||
int res = menu_return::RETURN_REPAINT;
|
int res = menu_return::RETURN_REPAINT;
|
||||||
static uint64_t channel_id = 0;
|
static uint64_t channel_id = 0;
|
||||||
|
std::string tmdb_str = "";
|
||||||
|
|
||||||
if (mp_movie_info == NULL)
|
if (mp_movie_info == NULL)
|
||||||
return res;
|
return res;
|
||||||
@@ -503,6 +504,7 @@ int CEpgData::show_mp(MI_MOVIE_INFO *mp_movie_info, int mp_position, int mp_dura
|
|||||||
|
|
||||||
tmdbtoggle = false;
|
tmdbtoggle = false;
|
||||||
stars = 0;
|
stars = 0;
|
||||||
|
tmdb_str = mp_movie_info->epgInfo2;
|
||||||
|
|
||||||
CComponentsHeader* header = NULL;
|
CComponentsHeader* header = NULL;
|
||||||
CComponentsPicture* headerPic = NULL;
|
CComponentsPicture* headerPic = NULL;
|
||||||
@@ -663,6 +665,7 @@ int CEpgData::show_mp(MI_MOVIE_INFO *mp_movie_info, int mp_position, int mp_dura
|
|||||||
// show Button
|
// show Button
|
||||||
const struct button_label Button[] =
|
const struct button_label Button[] =
|
||||||
{
|
{
|
||||||
|
{ NEUTRINO_ICON_BUTTON_RED , LOCALE_EPG_SAVING },
|
||||||
{ NEUTRINO_ICON_BUTTON_INFO_SMALL , LOCALE_CHANNELLIST_ADDITIONAL }
|
{ NEUTRINO_ICON_BUTTON_INFO_SMALL , LOCALE_CHANNELLIST_ADDITIONAL }
|
||||||
};
|
};
|
||||||
int icol_w, icol_h;
|
int icol_w, icol_h;
|
||||||
@@ -671,7 +674,7 @@ int CEpgData::show_mp(MI_MOVIE_INFO *mp_movie_info, int mp_position, int mp_dura
|
|||||||
int h = std::max(fh, icol_h+4);
|
int h = std::max(fh, icol_h+4);
|
||||||
int aw = ox - 20 - 2 * (ICON_LARGE_WIDTH + 2);
|
int aw = ox - 20 - 2 * (ICON_LARGE_WIDTH + 2);
|
||||||
frameBuffer->paintBoxRel(sx,sy+oy,ox,h, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_LARGE, CORNER_BOTTOM);
|
frameBuffer->paintBoxRel(sx,sy+oy,ox,h, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_LARGE, CORNER_BOTTOM);
|
||||||
::paintButtons(sx + 10, sy+oy, 0, 1, Button, aw, h, "", false, COL_INFOBAR_SHADOW_TEXT, NULL, 1);
|
::paintButtons(sx + 10, sy+oy, 0, 2, Button, aw, h, "", false, COL_INFOBAR_SHADOW_TEXT, NULL, 1);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
//show progressbar
|
//show progressbar
|
||||||
@@ -741,6 +744,9 @@ int CEpgData::show_mp(MI_MOVIE_INFO *mp_movie_info, int mp_position, int mp_dura
|
|||||||
epgText_saved = epgText;
|
epgText_saved = epgText;
|
||||||
epgText.clear();
|
epgText.clear();
|
||||||
tmdbtoggle = !tmdbtoggle;
|
tmdbtoggle = !tmdbtoggle;
|
||||||
|
tmdb_str = tmdb->getDescription();
|
||||||
|
if (!tmdb->getCast().empty())
|
||||||
|
tmdb_str += "\n\n"+(std::string)g_Locale->getText(LOCALE_EPGEXTENDED_ACTORS)+":\n"+ tmdb->getCast()+"\n";
|
||||||
processTextToArray(tmdb->CreateEPGText(), 0, tmdb->hasCover());
|
processTextToArray(tmdb->CreateEPGText(), 0, tmdb->hasCover());
|
||||||
textCount = epgText.size();
|
textCount = epgText.size();
|
||||||
stars = tmdb->getStars();
|
stars = tmdb->getStars();
|
||||||
@@ -758,7 +764,12 @@ int CEpgData::show_mp(MI_MOVIE_INFO *mp_movie_info, int mp_position, int mp_dura
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case CRCInput::RC_red:
|
||||||
|
{
|
||||||
|
if (tmdbtoggle) {
|
||||||
|
mp_movie_info->epgInfo2 = tmdb_str;
|
||||||
|
}
|
||||||
|
}
|
||||||
case CRCInput::RC_help:
|
case CRCInput::RC_help:
|
||||||
case CRCInput::RC_ok:
|
case CRCInput::RC_ok:
|
||||||
case CRCInput::RC_timeout:
|
case CRCInput::RC_timeout:
|
||||||
|
@@ -74,6 +74,7 @@ class cTmdb
|
|||||||
std::string getReleaseDate() { return minfo.release_date;}
|
std::string getReleaseDate() { return minfo.release_date;}
|
||||||
std::string getDescription() { return minfo.overview;}
|
std::string getDescription() { return minfo.overview;}
|
||||||
std::string getVote() { return minfo.vote_average;}
|
std::string getVote() { return minfo.vote_average;}
|
||||||
|
std::string getCast() { return minfo.cast;}
|
||||||
bool hasCover() { return !minfo.poster_path.empty();}
|
bool hasCover() { return !minfo.poster_path.empty();}
|
||||||
bool getBigCover(std::string cover) { return DownloadUrl("http://image.tmdb.org/t/p/w342" + minfo.poster_path, cover);}
|
bool getBigCover(std::string cover) { return DownloadUrl("http://image.tmdb.org/t/p/w342" + minfo.poster_path, cover);}
|
||||||
bool getSmallCover(std::string cover) { return DownloadUrl("http://image.tmdb.org/t/p/w185" + minfo.poster_path, cover);}
|
bool getSmallCover(std::string cover) { return DownloadUrl("http://image.tmdb.org/t/p/w185" + minfo.poster_path, cover);}
|
||||||
|
Reference in New Issue
Block a user