imdb/tmdb: more unifications; poster handling

Origin commit data
------------------
Branch: ni/coolstream
Commit: b9aea3ae5d
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-04-08 (Thu, 08 Apr 2021)

Origin message was:
------------------
- imdb/tmdb: more unifications; poster handling

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

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2021-04-08 17:31:07 +02:00
parent 3c826e06b6
commit 15e1be104e
6 changed files with 39 additions and 44 deletions

View File

@@ -254,9 +254,9 @@ void CEpgData::showText(int startPos, int ypos, bool has_cover, bool fullClear)
if (has_cover)
{
if (imdb_active)
cover = imdb->posterfile;
cover = imdb->getPoster();
else if (tmdb_active)
cover = tmdb->getCover();
cover = tmdb->getPoster();
g_PicViewer->getSize(cover.c_str(), &cover_width, &cover_height);
if (cover_width && cover_height)
@@ -1037,7 +1037,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
if (showPos+scrollCount<textCount)
{
showPos += scrollCount;
showText(showPos, sy + toph, tmdb_active || (imdb_active && imdb->gotPoster()), false);
showText(showPos, sy + toph, (tmdb_active && tmdb->hasPoster()) || (imdb_active && imdb->hasPoster()), false);
}
break;
case CRCInput::RC_up:
@@ -1045,7 +1045,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
showPos -= scrollCount;
if (showPos < 0)
showPos = 0;
showText(showPos, sy + toph, tmdb_active || (imdb_active && imdb->gotPoster()), false);
showText(showPos, sy + toph, (tmdb_active && tmdb->hasPoster()) || (imdb_active && imdb->hasPoster()), false);
}
break;
case CRCInput::RC_page_up:
@@ -1199,10 +1199,10 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
epgText.clear();
tmdb_active = true;
epgTextSwitch = tmdb->CreateMovieText();
processTextToArray(tmdb->CreateEPGText(), 0, tmdb->hasCover());
processTextToArray(tmdb->CreateEPGText(), 0, tmdb->hasPoster());
textCount = epgText.size();
tmdb_stars = tmdb->getStars();
showText(showPos, sy + toph, tmdb_active);
showText(showPos, sy + toph, tmdb->hasPoster());
} else {
ShowMsg(LOCALE_MESSAGEBOX_INFO, LOCALE_EPGVIEWER_NODETAILED, CMsgBox::mbrOk , CMsgBox::mbrOk);
}
@@ -1234,7 +1234,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
showTimerEventBar(true, !mp_info && isCurrentEPG(channel_id), mp_info); //show buttons
timeoutEnd = CRCInput::calcTimeoutEnd(timeout);
}
else if (imdb_active && imdb->gotPoster())
else if (imdb_active && imdb->hasPoster())
{
imdb_active = false;
CHintBox * hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, LOCALE_IMDB_INFO_SAVE);
@@ -1628,7 +1628,7 @@ void CEpgData::showTimerEventBar (bool pshow, bool adzap, bool mp_info)
if (imdb_active)
{
EpgButtons[UsedButtons][1].button = (imdb->gotPoster()) ? NEUTRINO_ICON_BUTTON_GREEN : NEUTRINO_ICON_BUTTON_DUMMY_SMALL;
EpgButtons[UsedButtons][1].button = (imdb->hasPoster()) ? NEUTRINO_ICON_BUTTON_GREEN : NEUTRINO_ICON_BUTTON_DUMMY_SMALL;
EpgButtons[UsedButtons][1].locale = LOCALE_IMDB_INFO_SAVE;
}
else
@@ -1692,7 +1692,7 @@ int CEpgData::showIMDb(bool splash)
//data
epgTextSwitch = imdb->CreateMovieText();
processTextToArray(imdb->CreateEPGText(), 0, imdb->gotPoster());
processTextToArray(imdb->CreateEPGText(), 0, imdb->hasPoster());
textCount = epgText.size();
@@ -1713,7 +1713,7 @@ int CEpgData::showIMDb(bool splash)
value.replace(pos, 1, ""); // change 8,1 or 8.1 to 81
imdb_stars = atoi(value);
showText(0, sy + toph, imdb->gotPoster());
showText(0, sy + toph, imdb->hasPoster());
return 0;
}