fix tmdb cover in moviebrowser

Signed-off-by: GetAway <get-away@t-online.de>
This commit is contained in:
BPanther
2019-05-02 20:55:51 +02:00
committed by GetAway
parent c0c72e8af8
commit d43e4912ce

View File

@@ -88,6 +88,8 @@ typedef struct dirent64 dirent_struct;
#define my_stat stat64
#define TRACE printf
cTmdb* tmdb;
#define NUMBER_OF_MOVIES_LAST 40 // This is the number of movies shown in last recored and last played list
#define MOVIE_SMSKEY_TIMEOUT 800
@@ -271,6 +273,9 @@ CMovieBrowser::~CMovieBrowser()
if (m_header)
delete m_header;
if (tmdb)
delete tmdb;
}
void CMovieBrowser::clearListLines()
@@ -428,6 +433,7 @@ void CMovieBrowser::init(void)
m_doRefresh = false;
m_doLoadMovies = false;
tmdb = cTmdb::getInstance();
imdb = CIMDB::getInstance();
}
@@ -2070,15 +2076,12 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg)
extension = "." + extension;
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)
delete tmdb;
}
}
}