epgview: introduce ResetMDb()

Origin commit data
------------------
Commit: b3e981cc3e
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-05-25 (Tue, 25 May 2021)

Origin message was:
------------------
- epgview: introduce ResetMDb()
This commit is contained in:
vanhofen
2021-05-25 22:52:17 +02:00
parent ad51341b2f
commit b391554b16
2 changed files with 14 additions and 19 deletions

View File

@@ -133,9 +133,8 @@ CEpgData::CEpgData()
imdb = CIMDB::getInstance();
imdb_active = false;
tmdb = CTMDB::getInstance();
tmdb_active = false;
ResetMDb();
movie_filename.clear();
}
@@ -731,10 +730,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
startzeit=*a_startzeit;
id=a_id;
imdb_active = false;
imdb_stars = 0;
tmdb_active = false;
tmdb_stars = 0;
ResetMDb();
t_channel_id epg_id = channel_id;
CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(channel_id);
@@ -1271,10 +1267,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
}
case CRCInput::RC_blue:
{
imdb_active = false;
imdb_stars = 0;
tmdb_active = false;
tmdb_stars = 0;
ResetMDb();
if(!followlist.empty() && !call_fromfollowlist){
hide();
@@ -1334,10 +1327,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
break;
}
case CRCInput::RC_help:
imdb_active = false;
imdb_stars = 0;
tmdb_active = false;
tmdb_stars = 0;
ResetMDb();
bigFonts = bigFonts ? false : true;
ResetModules();
@@ -1458,13 +1448,9 @@ void CEpgData::hide()
frameBuffer->paintBackgroundBoxRel(sx, sy, ox, oy);
showTimerEventBar (false);
// imdb
imdb_active = false;
imdb->cleanup();
// tmdb
tmdb_active = false;
tmdb->cleanup();
ResetMDb();
}
void CEpgData::GetEPGData(const t_channel_id channel_id, uint64_t id, time_t* startzeit, bool clear )
@@ -1713,6 +1699,14 @@ void CEpgData::ResetModules()
}
}
void CEpgData::ResetMDb()
{
imdb_active = false;
imdb_stars = 0;
tmdb_active = false;
tmdb_stars = 0;
}
// -- EPG Data Viewer Menu Handler Class
// -- to be used for calls from Menu

View File

@@ -102,6 +102,7 @@ class CEpgData
void showTimerEventBar(bool show, bool adzap = false, bool mp_info = false);
void showProgressBar();
bool isCurrentEPG(const t_channel_id channel_id);
void ResetMDb();
std::string epg_title;
std::string movie_filename;