mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
epgview: fix segfault, when imdb cover is saved in moviebrowser
Origin commit data
------------------
Branch: ni/coolstream
Commit: 979c109dbf
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-08-07 (Sun, 07 Aug 2016)
Origin message was:
------------------
- epgview: fix segfault, when imdb cover is saved in moviebrowser
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -130,6 +130,7 @@ CEpgData::CEpgData()
|
|||||||
//NI
|
//NI
|
||||||
imdb = CIMDB::getInstance();
|
imdb = CIMDB::getInstance();
|
||||||
imdb_active = false;
|
imdb_active = false;
|
||||||
|
movie_filename.clear(); //NI
|
||||||
}
|
}
|
||||||
|
|
||||||
CEpgData::~CEpgData()
|
CEpgData::~CEpgData()
|
||||||
@@ -561,6 +562,7 @@ int CEpgData::show_mp(MI_MOVIE_INFO *mp_movie_info, int /*mp_position*/, int /*m
|
|||||||
epgData.title = mp_movie_info->epgTitle;
|
epgData.title = mp_movie_info->epgTitle;
|
||||||
epgData.info1 = mp_movie_info->epgInfo1;
|
epgData.info1 = mp_movie_info->epgInfo1;
|
||||||
epgData.info2 = mp_movie_info->epgInfo2;
|
epgData.info2 = mp_movie_info->epgInfo2;
|
||||||
|
movie_filename = mp_movie_info->file.Name; //NI
|
||||||
|
|
||||||
epgData.itemDescriptions.clear();
|
epgData.itemDescriptions.clear();
|
||||||
epgData.items.clear();
|
epgData.items.clear();
|
||||||
@@ -1123,13 +1125,26 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
CHintBox * hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, LOCALE_IMDB_INFO_SAVE);
|
||||||
|
hintBox->paint();
|
||||||
imdb_active = false;
|
imdb_active = false;
|
||||||
std::string filename = imdb->getFilename(channel, epgData.eventID);
|
|
||||||
|
|
||||||
if (File_copy(imdb->posterfile.c_str(), filename.c_str()))
|
std::string picname;
|
||||||
showTimerEventBar (true); //show buttons
|
if (mp_info)
|
||||||
|
{
|
||||||
|
size_t _pos;
|
||||||
|
if ((_pos = movie_filename.rfind(".")) != std::string::npos)
|
||||||
|
picname = movie_filename.substr(0, _pos) + ".jpg";
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
picname = imdb->getFilename(channel, epgData.eventID);
|
||||||
|
|
||||||
|
if (!File_copy(imdb->posterfile.c_str(), picname.c_str()))
|
||||||
perror( "IMDb: error copy file" );
|
perror( "IMDb: error copy file" );
|
||||||
|
|
||||||
|
sleep(2);
|
||||||
|
hintBox->hide();
|
||||||
|
showTimerEventBar (true); //show buttons
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -103,6 +103,7 @@ class CEpgData
|
|||||||
int imdb_stars;
|
int imdb_stars;
|
||||||
std::string imdb_rating;
|
std::string imdb_rating;
|
||||||
std::string epg_title;
|
std::string epg_title;
|
||||||
|
std::string movie_filename;
|
||||||
int showIMDb(bool splash = false);
|
int showIMDb(bool splash = false);
|
||||||
Font *fontIMDb;
|
Font *fontIMDb;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user