mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 23:13:00 +02:00
record-info: try to fix rec/ts-icon for current channel
Origin commit data
------------------
Branch: ni/coolstream
Commit: 2ce74b827a
Author: vanhofen <vanhofen@gmx.de>
Date: 2024-11-20 (Wed, 20 Nov 2024)
Origin message was:
------------------
- record-info: try to fix rec/ts-icon for current channel
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -71,18 +71,18 @@ void CRecInfo::init()
|
|||||||
// init basic objects
|
// init basic objects
|
||||||
rv_rec_img = NULL;
|
rv_rec_img = NULL;
|
||||||
rv_ts_img = NULL;
|
rv_ts_img = NULL;
|
||||||
CRecordManager *crm = CRecordManager::getInstance();
|
|
||||||
bool recordModeActive = crm->RecordingStatus();
|
|
||||||
|
|
||||||
// init text vars
|
// init text vars
|
||||||
std::string rec_icon = "";
|
std::string rec_icon = "";
|
||||||
std::string ts_icon = "";
|
std::string ts_icon = "";
|
||||||
std::string s_records = "0x";
|
std::string s_records = "0x";
|
||||||
|
|
||||||
|
CRecordManager *crm = CRecordManager::getInstance();
|
||||||
|
bool recordModeActive = crm->RecordingStatus();
|
||||||
if (recordModeActive)
|
if (recordModeActive)
|
||||||
{
|
{
|
||||||
// get current channel id
|
rec_icon = NEUTRINO_ICON_REC_GRAY;
|
||||||
t_channel_id cur_chid = g_RemoteControl->current_channel_id;
|
ts_icon = NEUTRINO_ICON_AUTO_SHIFT_GRAY;
|
||||||
|
|
||||||
// get current record count
|
// get current record count
|
||||||
int records = crm->GetRecordCount();
|
int records = crm->GetRecordCount();
|
||||||
@@ -90,31 +90,22 @@ void CRecInfo::init()
|
|||||||
// get global record mode
|
// get global record mode
|
||||||
int rec_mode = crm->GetRecordMode();
|
int rec_mode = crm->GetRecordMode();
|
||||||
|
|
||||||
|
// get current channel id
|
||||||
|
t_channel_id cur_chid = g_RemoteControl->current_channel_id;
|
||||||
|
|
||||||
// get current channel record mode
|
// get current channel record mode
|
||||||
int cur_rec_mode = crm->GetRecordMode(cur_chid);
|
int cur_rec_mode = crm->GetRecordMode(cur_chid);
|
||||||
|
|
||||||
// set 'active' icons for record mode
|
// set 'active' icon for record mode
|
||||||
if (rec_mode & CRecordManager::RECMODE_REC)
|
if (cur_rec_mode & CRecordManager::RECMODE_REC)
|
||||||
{
|
|
||||||
if (cur_rec_mode & CRecordManager::RECMODE_OFF)
|
|
||||||
rec_icon = NEUTRINO_ICON_REC_GRAY;
|
|
||||||
else
|
|
||||||
rec_icon = NEUTRINO_ICON_REC;
|
|
||||||
}
|
|
||||||
else if (rec_mode & CRecordManager::RECMODE_TSHIFT)
|
|
||||||
{
|
|
||||||
// subtract ts
|
|
||||||
//records--;
|
|
||||||
if (cur_rec_mode & CRecordManager::RECMODE_OFF)
|
|
||||||
ts_icon = NEUTRINO_ICON_AUTO_SHIFT_GRAY;
|
|
||||||
else
|
|
||||||
ts_icon = NEUTRINO_ICON_AUTO_SHIFT;
|
|
||||||
}
|
|
||||||
else if (rec_mode & CRecordManager::RECMODE_REC_TSHIFT)
|
|
||||||
{
|
|
||||||
rec_icon = NEUTRINO_ICON_REC;
|
rec_icon = NEUTRINO_ICON_REC;
|
||||||
|
|
||||||
|
// set 'active' icon for timeshift mode
|
||||||
|
if (cur_rec_mode & CRecordManager::RECMODE_TSHIFT)
|
||||||
ts_icon = NEUTRINO_ICON_AUTO_SHIFT;
|
ts_icon = NEUTRINO_ICON_AUTO_SHIFT;
|
||||||
}
|
|
||||||
|
if (rec_mode == CRecordManager::RECMODE_REC_TSHIFT)
|
||||||
|
records--; // subtract ts
|
||||||
|
|
||||||
s_records = to_string(records) + "x";
|
s_records = to_string(records) + "x";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user