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:
vanhofen
2021-09-24 22:52:05 +02:00
parent ed081adc60
commit 11774308c0
5 changed files with 105 additions and 71 deletions

View File

@@ -1293,6 +1293,8 @@ mbkey.copy_several Film kopieren und teilen
mbkey.cover Filmcover erzeugen/löschen
mbkey.cut Film schneiden
mbkey.truncate Film kürzen
mdb.head Movie Database
mdb.choose Movie Database wählen
mdb.save_poster Bild speichern
mdb.save_poster_hint Bild speichern mit "%s"
menu.back Zurück

View File

@@ -1087,7 +1087,7 @@ imdb.data_title Original title
imdb.data_votes Votes
imdb.data_website Website
imdb.data_writer Screenplay author
imdb.info IMDb-Info
imdb.head IMDb
imdb.read_data Search IMDb data ...
inetradio.name Internetradio
inetradio_autostart Internetradio auto-start
@@ -1293,6 +1293,8 @@ mbkey.copy_several Copy and split movie
mbkey.cover Create/remove movie cover
mbkey.cut Cut movie
mbkey.truncate Truncate movie
mdb.head Movie database
mdb.choose Choose movie database
mdb.save_poster Save poster
mdb.save_poster_hint Save poster with "%s"
menu.back Back
@@ -2913,7 +2915,7 @@ timing.static_messages Interactive messages
timing.volumebar Volume bar
tmdb.api_key TMDb API key
tmdb.enabled TMDb support
tmdb.info TMDb-Info
tmdb.head TMDb
tmdb.read_data Search TMDb data ...
tunersetup.cable Cable (DVB-C)
tunersetup.hybrid Hybrid (DVB-C/T/T2)

View File

@@ -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);
}
}

View File

@@ -1114,7 +1114,7 @@ typedef enum
LOCALE_IMDB_DATA_VOTES,
LOCALE_IMDB_DATA_WEBSITE,
LOCALE_IMDB_DATA_WRITER,
LOCALE_IMDB_INFO,
LOCALE_IMDB_HEAD,
LOCALE_IMDB_READ_DATA,
LOCALE_INETRADIO_NAME,
LOCALE_INETRADIO_AUTOSTART,
@@ -1320,6 +1320,8 @@ typedef enum
LOCALE_MBKEY_COVER,
LOCALE_MBKEY_CUT,
LOCALE_MBKEY_TRUNCATE,
LOCALE_MDB_HEAD,
LOCALE_MDB_CHOOSE,
LOCALE_MDB_SAVE_POSTER,
LOCALE_MDB_SAVE_POSTER_HINT,
LOCALE_MENU_BACK,
@@ -2940,7 +2942,7 @@ typedef enum
LOCALE_TIMING_VOLUMEBAR,
LOCALE_TMDB_API_KEY,
LOCALE_TMDB_ENABLED,
LOCALE_TMDB_INFO,
LOCALE_TMDB_HEAD,
LOCALE_TMDB_READ_DATA,
LOCALE_TUNERSETUP_CABLE,
LOCALE_TUNERSETUP_HYBRID,

View File

@@ -1114,7 +1114,7 @@ const char * locale_real_names[] =
"imdb.data_votes",
"imdb.data_website",
"imdb.data_writer",
"imdb.info",
"imdb.head",
"imdb.read_data",
"inetradio.name",
"inetradio_autostart",
@@ -1320,6 +1320,8 @@ const char * locale_real_names[] =
"mbkey.cover",
"mbkey.cut",
"mbkey.truncate",
"mdb.head",
"mdb.choose",
"mdb.save_poster",
"mdb.save_poster_hint",
"menu.back",
@@ -2940,7 +2942,7 @@ const char * locale_real_names[] =
"timing.volumebar",
"tmdb.api_key",
"tmdb.enabled",
"tmdb.info",
"tmdb.head",
"tmdb.read_data",
"tunersetup.cable",
"tunersetup.hybrid",