mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
epgview: add movie database selection
Origin commit data
------------------
Branch: ni/coolstream
Commit: 0b0cbabeca
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-09-24 (Fri, 24 Sep 2021)
Origin message was:
------------------
- epgview: add movie database selection
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1184,18 +1184,51 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
||||
printf("timerd not available\n");
|
||||
}
|
||||
break;
|
||||
// imdb/omdb info
|
||||
// imdb/omdb info and tmdb info
|
||||
case CRCInput::RC_green:
|
||||
{
|
||||
if (tmdb_active)
|
||||
bool omdb_start = false;
|
||||
bool tmdb_start = false;
|
||||
|
||||
if (g_settings.omdb_enabled && g_settings.tmdb_enabled)
|
||||
{
|
||||
tmdb_active = false;
|
||||
tmdb_stars = 0;
|
||||
epgText = epgText_saved;
|
||||
textCount = epgText.size();
|
||||
CMsgBox msgBox(g_Locale->getText(LOCALE_MDB_CHOOSE), LOCALE_MDB_HEAD);
|
||||
msgBox.setShowedButtons(CMsgBox::mbNo | CMsgBox::mbYes);
|
||||
msgBox.setButtonText(CMsgBox::mbNo, g_Locale->getText(LOCALE_IMDB_HEAD));
|
||||
msgBox.setButtonText(CMsgBox::mbYes, g_Locale->getText(LOCALE_TMDB_HEAD));
|
||||
msgBox.paint();
|
||||
msgBox.exec();
|
||||
msgBox.hide();
|
||||
|
||||
switch (msgBox.getResult())
|
||||
{
|
||||
case CMsgBox::mbrNo: // imdb
|
||||
omdb_start = true;
|
||||
break;
|
||||
case CMsgBox::mbrYes: // tmdb
|
||||
tmdb_start = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (g_settings.omdb_enabled)
|
||||
else if (g_settings.omdb_enabled)
|
||||
omdb_start = true;
|
||||
else if (g_settings.tmdb_enabled)
|
||||
tmdb_start = true;
|
||||
else
|
||||
break;
|
||||
|
||||
if (omdb_start)
|
||||
{
|
||||
if (tmdb_active)
|
||||
{
|
||||
tmdb_active = false;
|
||||
tmdb_stars = 0;
|
||||
epgText = epgText_saved;
|
||||
textCount = epgText.size();
|
||||
}
|
||||
|
||||
showPos = 0;
|
||||
if (!imdb_active)
|
||||
{
|
||||
@@ -1225,21 +1258,17 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
||||
showText(showPos, sy + toph);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
// tmdb info
|
||||
case CRCInput::RC_yellow:
|
||||
{
|
||||
if (imdb_active)
|
||||
{
|
||||
imdb_active = false;
|
||||
imdb_stars = 0;
|
||||
showTimerEventBar(true, !mp_info && isCurrentEPG(channel_id), mp_info); //show buttons
|
||||
epgText = epgText_saved;
|
||||
textCount = epgText.size();
|
||||
}
|
||||
if (g_settings.tmdb_enabled)
|
||||
else if (tmdb_start)
|
||||
{
|
||||
if (imdb_active)
|
||||
{
|
||||
imdb_active = false;
|
||||
imdb_stars = 0;
|
||||
showTimerEventBar(true, !mp_info && isCurrentEPG(channel_id), mp_info); //show buttons
|
||||
epgText = epgText_saved;
|
||||
textCount = epgText.size();
|
||||
}
|
||||
|
||||
showPos = 0;
|
||||
if (!tmdb_active)
|
||||
{
|
||||
@@ -1270,33 +1299,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CRCInput::RC_blue:
|
||||
{
|
||||
ResetMDb();
|
||||
|
||||
if(!followlist.empty() && !call_fromfollowlist){
|
||||
hide();
|
||||
time_t tmp_sZeit = epgData.epg_times.startzeit;
|
||||
uint64_t tmp_eID = epgData.eventID;
|
||||
|
||||
CEventList *ee = new CEventList;
|
||||
res = ee->exec(channel_id, g_Locale->getText(LOCALE_EPGVIEWER_MORE_SCREENINGS_SHORT),"","",followlist); // UTF-8
|
||||
delete ee;
|
||||
if (res == menu_return::RETURN_EXIT_ALL)
|
||||
loop = false;
|
||||
else {
|
||||
if (!bigFonts && g_settings.bigFonts) {
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIGFONT_FACTOR));
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIGFONT_FACTOR));
|
||||
}
|
||||
bigFonts = g_settings.bigFonts;
|
||||
show(channel_id,tmp_eID,&tmp_sZeit,false);
|
||||
showPos=0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CRCInput::RC_0:
|
||||
case CRCInput::RC_yellow:
|
||||
{
|
||||
if (!mp_info)
|
||||
{
|
||||
@@ -1331,6 +1334,37 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CRCInput::RC_blue:
|
||||
{
|
||||
ResetMDb();
|
||||
|
||||
if (!followlist.empty() && !call_fromfollowlist)
|
||||
{
|
||||
hide();
|
||||
|
||||
time_t tmp_sZeit = epgData.epg_times.startzeit;
|
||||
uint64_t tmp_eID = epgData.eventID;
|
||||
|
||||
CEventList *ee = new CEventList;
|
||||
res = ee->exec(channel_id, g_Locale->getText(LOCALE_EPGVIEWER_MORE_SCREENINGS_SHORT),"","",followlist); // UTF-8
|
||||
delete ee;
|
||||
|
||||
if (res == menu_return::RETURN_EXIT_ALL)
|
||||
loop = false;
|
||||
else
|
||||
{
|
||||
if (!bigFonts && g_settings.bigFonts)
|
||||
{
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIGFONT_FACTOR));
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIGFONT_FACTOR));
|
||||
}
|
||||
bigFonts = g_settings.bigFonts;
|
||||
show(channel_id, tmp_eID, &tmp_sZeit, false);
|
||||
showPos=0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CRCInput::RC_help:
|
||||
ResetMDb();
|
||||
|
||||
@@ -1622,16 +1656,14 @@ struct button_label EpgButtons[][5] =
|
||||
{
|
||||
// TV_BUTTONS
|
||||
{ NEUTRINO_ICON_BUTTON_RED, LOCALE_TIMERBAR_RECORDEVENT },
|
||||
{ NEUTRINO_ICON_BUTTON_GREEN, LOCALE_IMDB_INFO },
|
||||
{ NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_TMDB_INFO },
|
||||
{ NEUTRINO_ICON_BUTTON_BLUE, LOCALE_EPGVIEWER_MORE_SCREENINGS_SHORT },
|
||||
{ NEUTRINO_ICON_BUTTON_0, LOCALE_TIMERBAR_CHANNELSWITCH }
|
||||
{ NEUTRINO_ICON_BUTTON_GREEN, LOCALE_MDB_HEAD },
|
||||
{ NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_TIMERBAR_CHANNELSWITCH },
|
||||
{ NEUTRINO_ICON_BUTTON_BLUE, LOCALE_EPGVIEWER_MORE_SCREENINGS_SHORT }
|
||||
},
|
||||
{
|
||||
// MP_BUTTONS
|
||||
{ NEUTRINO_ICON_BUTTON_RED, LOCALE_EPG_SAVING },
|
||||
{ NEUTRINO_ICON_BUTTON_GREEN, LOCALE_IMDB_INFO },
|
||||
{ NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_TMDB_INFO }
|
||||
{ NEUTRINO_ICON_BUTTON_GREEN, LOCALE_MDB_HEAD }
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1652,7 +1684,7 @@ void CEpgData::showTimerEventBar (bool pshow, bool adzap, bool mp_info)
|
||||
}
|
||||
|
||||
int UsedButtons = mp_info ? MP_BUTTONS : TV_BUTTONS;
|
||||
int MaxButtons = mp_info ? 3 : 5; //TODO: auto-calc from struct
|
||||
int MaxButtons = mp_info ? 2 : 4; //TODO: auto-calc from struct
|
||||
|
||||
std::string adzap_button;
|
||||
if (adzap)
|
||||
@@ -1662,18 +1694,12 @@ void CEpgData::showTimerEventBar (bool pshow, bool adzap, bool mp_info)
|
||||
adzap_button += g_Locale->getText(LOCALE_UNIT_SHORT_MINUTE);
|
||||
}
|
||||
|
||||
// check imdb button
|
||||
if (g_settings.omdb_enabled)
|
||||
// check mdb button
|
||||
if (g_settings.omdb_enabled || g_settings.tmdb_enabled)
|
||||
EpgButtons[UsedButtons][1].button = NEUTRINO_ICON_BUTTON_GREEN;
|
||||
else
|
||||
EpgButtons[UsedButtons][1].button = NEUTRINO_ICON_BUTTON_DUMMY_SMALL;
|
||||
|
||||
// check tmdb button
|
||||
if (g_settings.tmdb_enabled)
|
||||
EpgButtons[UsedButtons][2].button = NEUTRINO_ICON_BUTTON_YELLOW;
|
||||
else
|
||||
EpgButtons[UsedButtons][2].button = NEUTRINO_ICON_BUTTON_DUMMY_SMALL;
|
||||
|
||||
if (mp_info)
|
||||
::paintButtons(x, y, w, MaxButtons, EpgButtons[MP_BUTTONS], w, h);
|
||||
else
|
||||
@@ -1685,9 +1711,9 @@ void CEpgData::showTimerEventBar (bool pshow, bool adzap, bool mp_info)
|
||||
EpgButtons[TV_BUTTONS][3].button = NEUTRINO_ICON_BUTTON_DUMMY_SMALL;
|
||||
|
||||
if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF)
|
||||
::paintButtons(x, y, w, MaxButtons, EpgButtons[TV_BUTTONS], w, h, "", false, COL_MENUFOOT_TEXT, adzap ? adzap_button.c_str() : NULL, 4);
|
||||
::paintButtons(x, y, w, MaxButtons, EpgButtons[TV_BUTTONS], w, h, "", false, COL_MENUFOOT_TEXT, adzap ? adzap_button.c_str() : NULL, 2);
|
||||
else // don't show recording button
|
||||
::paintButtons(x, y, w, MaxButtons, &EpgButtons[TV_BUTTONS][1], w, h, "", false, COL_MENUFOOT_TEXT, adzap ? adzap_button.c_str() : NULL, 3);
|
||||
::paintButtons(x, y, w, MaxButtons, &EpgButtons[TV_BUTTONS][1], w, h, "", false, COL_MENUFOOT_TEXT, adzap ? adzap_button.c_str() : NULL, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user