mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 09:21:18 +02:00
fix tmdb cover in moviebrowser
Signed-off-by: GetAway <get-away@t-online.de>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user