- moviebrowser: better check for *tmdb's availability

Signed-off-by: GetAway <get-away@t-online.de>
This commit is contained in:
svenhoefer
2019-05-02 21:05:30 +02:00
committed by GetAway
parent 13c4cc90ef
commit c9d6285091

View File

@@ -2071,13 +2071,15 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg)
str_replace(extension, ".jpg", cover_file);
printf("TMDB: %s : %s\n",m_movieSelectionHandler->file.Name.c_str(),cover_file.c_str());
cTmdb* tmdb = cTmdb::getInstance();
tmdb->setTitle(m_movieSelectionHandler->epgTitle);
if ((tmdb->getResults() > 0) && (tmdb->hasCover())) {
if (!cover_file.empty())
if (tmdb->getSmallCover(cover_file))
refresh();
}
if (tmdb) {
if (tmdb)
{
tmdb->setTitle(m_movieSelectionHandler->epgTitle);
if ((tmdb->getResults() > 0) && (tmdb->hasCover()))
{
if (!cover_file.empty())
if (tmdb->getSmallCover(cover_file))
refresh();
}
tmdb->cleanup();
tmdb = NULL;
}