mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
add primetime feature to channellist
use green button in favorites to show whats showing on primetime Conflicts: data/locale/english.locale src/gui/channellist.cpp
This commit is contained in:
@@ -177,6 +177,14 @@ void CChannelList::updateEvents(unsigned int from, unsigned int to)
|
||||
CChannelEventList events;
|
||||
if (displayNext) {
|
||||
time_t atime = time(NULL);
|
||||
if (g_settings.channellist_primetime && primetime)
|
||||
{
|
||||
struct tm * timeinfo;
|
||||
timeinfo = localtime (&atime);
|
||||
timeinfo->tm_hour = 20;
|
||||
timeinfo->tm_min = 0;
|
||||
atime = mktime(timeinfo);
|
||||
}
|
||||
unsigned int count;
|
||||
for (count = from; count < to; count++) {
|
||||
CEitManager::getInstance()->getEventsServiceKey((*chanlist)[count]->getEpgID(), events);
|
||||
@@ -472,6 +480,7 @@ int CChannelList::exec()
|
||||
{
|
||||
displayNext = 0; // always start with current events
|
||||
displayList = 1; // always start with event list
|
||||
primetime = 0;
|
||||
int nNewChannel = show();
|
||||
if ( nNewChannel > -1 && nNewChannel < (int) (*chanlist).size()) {
|
||||
if(this->historyMode && (*chanlist)[nNewChannel]) {
|
||||
@@ -857,10 +866,22 @@ int CChannelList::show()
|
||||
if (move_state != beMoving)
|
||||
renameChannel();
|
||||
} else {
|
||||
if (g_settings.channellist_additional && !displayNext)
|
||||
displayList = !displayList;
|
||||
if (displayList)
|
||||
displayNext = !displayNext;
|
||||
#if 0
|
||||
if (g_settings.channellist_additional)
|
||||
displayList = !displayList;
|
||||
else
|
||||
displayNext = !displayNext;
|
||||
else {
|
||||
if (primetime && displayNext)
|
||||
primetime = 0;
|
||||
else {
|
||||
primetime = 0;
|
||||
displayNext = !displayNext;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
paint();
|
||||
}
|
||||
@@ -879,7 +900,17 @@ int CChannelList::show()
|
||||
CNeutrinoApp::getInstance()->SetChannelMode(mode);
|
||||
oldselected = selected;
|
||||
paint();
|
||||
} else {
|
||||
if (g_settings.channellist_primetime) {
|
||||
if (displayNext && !primetime)
|
||||
primetime = 1;
|
||||
else {
|
||||
primetime = 1;
|
||||
displayNext = !displayNext;
|
||||
}
|
||||
paint();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!empty && edit_state && move_state != beMoving && msg == CRCInput::RC_stop )
|
||||
@@ -1823,7 +1854,16 @@ void CChannelList::paintButtonBar(bool is_current)
|
||||
break;
|
||||
}
|
||||
} else
|
||||
continue;
|
||||
{
|
||||
if (g_settings.channellist_primetime)
|
||||
{
|
||||
if (displayNext && primetime)
|
||||
Button[bcnt].locale = LOCALE_INFOVIEWER_NOW;
|
||||
else
|
||||
Button[bcnt].locale = LOCALE_CHANNELLIST_PRIMETIME;
|
||||
} else
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (i == 3) {
|
||||
//manage now/next button
|
||||
@@ -1833,7 +1873,7 @@ void CChannelList::paintButtonBar(bool is_current)
|
||||
else
|
||||
Button[bcnt].locale = LOCALE_FONTMENU_EVENTLIST;
|
||||
} else {
|
||||
if (displayNext)
|
||||
if (displayNext && !primetime)
|
||||
Button[bcnt].locale = LOCALE_INFOVIEWER_NOW;
|
||||
else
|
||||
Button[bcnt].locale = LOCALE_INFOVIEWER_NEXT;
|
||||
@@ -2296,8 +2336,11 @@ void CChannelList::paintBody()
|
||||
frameBuffer->paintBoxRel(x, y+theight, width, height-footerHeight-theight, COL_MENUCONTENT_PLUS_0);
|
||||
if (g_settings.channellist_additional)
|
||||
{
|
||||
#if 0
|
||||
// disable displayNext
|
||||
displayNext = false;
|
||||
if (!g_settings.channellist_primetime)
|
||||
displayNext = false;
|
||||
#endif
|
||||
// paint background for right box
|
||||
frameBuffer->paintBoxRel(x+width,y+theight+pig_height,infozone_width,infozone_height,COL_MENUCONTENT_PLUS_0);
|
||||
}
|
||||
@@ -2360,6 +2403,14 @@ bool CChannelList::SameTP(CZapitChannel * channel)
|
||||
if (IS_WEBCHAN(channel->getChannelID()))
|
||||
return true;
|
||||
|
||||
#if 0 //Usable CI channel while recording
|
||||
if(g_settings.ci_mode != 0 && channel->bUseCI && CRecordManager::getInstance()->getUseCI()) {
|
||||
if(g_settings.ci_mode == 1)
|
||||
return (CRecordManager::getInstance()->SameTransponder(channel->getChannelID())); // SameTransponder
|
||||
else
|
||||
return false; // No other CI channel
|
||||
}
|
||||
#endif
|
||||
iscurrent = CFEManager::getInstance()->canTune(channel);
|
||||
}
|
||||
return iscurrent;
|
||||
@@ -2546,6 +2597,8 @@ void CChannelList::showdescription(int index)
|
||||
ffheight = g_Font[eventFont]->getHeight();
|
||||
CZapitChannel* chan = (*chanlist)[index];
|
||||
CChannelEvent *p_event = &chan->currentEvent;
|
||||
if (displayNext && primetime)
|
||||
p_event = &chan->nextEvent;
|
||||
epgData.info1.clear();
|
||||
epgData.info2.clear();
|
||||
epgText.clear();
|
||||
|
Reference in New Issue
Block a user