mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
src/gui/eventlist.cpp fix timeshif_record timer handling
This commit is contained in:
@@ -858,6 +858,17 @@ CRecordInstance * CRecordManager::FindTimeshift()
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool CRecordManager::CheckRecordingId_if_Timeshift(int recid)
|
||||
{
|
||||
if(recid > 0){
|
||||
CRecordInstance * inst = FindInstanceID(recid);
|
||||
if(inst){
|
||||
return inst->Timeshift();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
MI_MOVIE_INFO * CRecordManager::GetMovieInfo(t_channel_id channel_id, bool timeshift)
|
||||
{
|
||||
//FIXME copy MI_MOVIE_INFO ?
|
||||
|
@@ -195,6 +195,7 @@ class CRecordManager : public CMenuTarget /*, public CChangeObserver*/
|
||||
bool StartAutoRecord();
|
||||
bool StopAutoRecord(bool lock = true);
|
||||
void StopAutoTimer();
|
||||
bool CheckRecordingId_if_Timeshift(int recid);
|
||||
|
||||
MI_MOVIE_INFO * GetMovieInfo(const t_channel_id channel_id, bool timeshift = true);
|
||||
const std::string GetFileName(const t_channel_id channel_id, bool timeshift = true);
|
||||
|
@@ -705,8 +705,15 @@ CTimerd::CTimerEventTypes CEventList::isScheduled(t_channel_id channel_id, CChan
|
||||
if(timer->channel_id == channel_id && (timer->eventType == CTimerd::TIMER_ZAPTO || timer->eventType == CTimerd::TIMER_RECORD)) {
|
||||
if(timer->epgID == event->eventID) {
|
||||
if(timer->epg_starttime == event->startTime) {
|
||||
bool isTimeShiftTimer = false;
|
||||
if( timer->eventType == CTimerd::TIMER_RECORD){
|
||||
isTimeShiftTimer = CRecordManager::getInstance()->CheckRecordingId_if_Timeshift(timer->eventID);
|
||||
}
|
||||
if(tID)
|
||||
*tID = timer->eventID;
|
||||
if(isTimeShiftTimer)//skip TSHIFT RECORD
|
||||
continue;
|
||||
|
||||
return timer->eventType;
|
||||
}
|
||||
}
|
||||
@@ -786,14 +793,14 @@ void CEventList::paintItem(unsigned int pos, t_channel_id channel_idI)
|
||||
// 2nd line
|
||||
// set status icons
|
||||
t_channel_id channel_tmp = m_showChannel ? evtlist[curpos].channelID : channel_idI;
|
||||
CTimerd::CTimerEventTypes etype = isScheduled(channel_tmp, &evtlist[curpos]);
|
||||
int timerID = -1;
|
||||
CTimerd::CTimerEventTypes etype = isScheduled(channel_tmp, &evtlist[curpos],&timerID);
|
||||
const char * icontype = etype == CTimerd::TIMER_ZAPTO ? NEUTRINO_ICON_ZAP : 0;
|
||||
if(etype == CTimerd::TIMER_RECORD){
|
||||
int rec_mode = CRecordManager::getInstance()->GetRecordMode(channel_tmp);
|
||||
if (rec_mode == CRecordManager::RECMODE_TSHIFT)
|
||||
icontype = NEUTRINO_ICON_REC;// NEUTRINO_ICON_RECORDING_EVENT_MARKER
|
||||
}else{
|
||||
if (timerID > 0 && CRecordManager::getInstance()->CheckRecordingId_if_Timeshift(timerID))
|
||||
icontype = NEUTRINO_ICON_AUTO_SHIFT;
|
||||
else
|
||||
icontype = NEUTRINO_ICON_REC;// NEUTRINO_ICON_RECORDING_EVENT_MARKER
|
||||
}
|
||||
int iw = 0, ih;
|
||||
if(icontype != 0) {
|
||||
|
Reference in New Issue
Block a user