mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
neutrino.cpp: fix indents; create new/removed channel lists in favorites (WIP, for testing
This commit is contained in:
@@ -1202,7 +1202,7 @@ void CNeutrinoApp::channelsInit(bool bOnly)
|
||||
|
||||
getActiveChannelNumber used to get index for direct access too ?
|
||||
*/
|
||||
int tvi = 0, ri = 0, hi = 0;
|
||||
int tvi = 0, ri = 0;
|
||||
|
||||
ZapitChannelList zapitList;
|
||||
|
||||
@@ -1227,20 +1227,7 @@ void CNeutrinoApp::channelsInit(bool bOnly)
|
||||
RADIOchannelList->SetChannelList(&zapitList);
|
||||
#endif
|
||||
|
||||
CBouquet* hdBouquet = NULL;
|
||||
/* all HD channels */
|
||||
if(g_settings.make_hd_list) {
|
||||
hdBouquet = new CBouquet(0, g_Locale->getText(LOCALE_BOUQUETNAME_HDTV), false, true);
|
||||
|
||||
CServiceManager::getInstance()->GetAllHDChannels(zapitList);
|
||||
hi = zapitList.size();
|
||||
hdBouquet->channelList->SetChannelList(&zapitList);
|
||||
|
||||
if(hi)
|
||||
hdBouquet->channelList->SortSat();
|
||||
}
|
||||
|
||||
printf("[neutrino] got %d TV (%d is HD) and %d RADIO channels\n", tvi, hi, ri); fflush(stdout);
|
||||
printf("[neutrino] got %d TV and %d RADIO channels\n", tvi, ri); fflush(stdout);
|
||||
TIMER_STOP("[neutrino] all channels took");
|
||||
|
||||
/* unless we will do real channel delete from allchans, needed once ? */
|
||||
@@ -1324,13 +1311,35 @@ void CNeutrinoApp::channelsInit(bool bOnly)
|
||||
}
|
||||
printf("[neutrino] got %d TV bouquets\n", bnum); fflush(stdout);
|
||||
|
||||
TIMER_STOP("[neutrino] tv took");
|
||||
/* all HD channels */
|
||||
if (g_settings.make_hd_list) {
|
||||
if(hi)
|
||||
CServiceManager::getInstance()->GetAllHDChannels(zapitList);
|
||||
if (!zapitList.empty()) {
|
||||
CBouquet* hdBouquet = new CBouquet(0, g_Locale->getText(LOCALE_BOUQUETNAME_HDTV), false, true);
|
||||
hdBouquet->channelList->SetChannelList(&zapitList);
|
||||
hdBouquet->channelList->SortSat();
|
||||
TVfavList->Bouquets.push_back(hdBouquet);
|
||||
else
|
||||
delete hdBouquet;
|
||||
printf("[neutrino] got %d HD channels\n", zapitList.size()); fflush(stdout);
|
||||
}
|
||||
}
|
||||
|
||||
/* new channels */
|
||||
CServiceManager::getInstance()->GetAllTvChannels(zapitList, CZapitChannel::NEW);
|
||||
if (!zapitList.empty()) {
|
||||
CBouquet* newBouquet = new CBouquet(0, g_Locale->getText(LOCALE_BOUQUETNAME_NEW), false, true);
|
||||
newBouquet->channelList->SetChannelList(&zapitList);
|
||||
TVfavList->Bouquets.push_back(newBouquet);
|
||||
printf("[neutrino] got %d new TV channels\n", zapitList.size()); fflush(stdout);
|
||||
}
|
||||
CServiceManager::getInstance()->GetAllTvChannels(zapitList, CZapitChannel::REMOVED);
|
||||
if (!zapitList.empty()) {
|
||||
CBouquet* newBouquet = new CBouquet(0, g_Locale->getText(LOCALE_BOUQUETNAME_REMOVED), false, true);
|
||||
newBouquet->channelList->SetChannelList(&zapitList);
|
||||
TVfavList->Bouquets.push_back(newBouquet);
|
||||
printf("[neutrino] got %d removed TV channels\n", zapitList.size()); fflush(stdout);
|
||||
}
|
||||
|
||||
TIMER_STOP("[neutrino] tv took");
|
||||
|
||||
/* Favorites and provides RADIO bouquets */
|
||||
bnum = 0;
|
||||
@@ -1347,6 +1356,22 @@ void CNeutrinoApp::channelsInit(bool bOnly)
|
||||
bnum++;
|
||||
}
|
||||
}
|
||||
/* new channels */
|
||||
CServiceManager::getInstance()->GetAllRadioChannels(zapitList, CZapitChannel::NEW);
|
||||
if (!zapitList.empty()) {
|
||||
CBouquet* newBouquet = new CBouquet(0, g_Locale->getText(LOCALE_BOUQUETNAME_NEW), false, true);
|
||||
newBouquet->channelList->SetChannelList(&zapitList);
|
||||
RADIOfavList->Bouquets.push_back(newBouquet);
|
||||
printf("[neutrino] got %d new RADIO channels\n", zapitList.size()); fflush(stdout);
|
||||
}
|
||||
CServiceManager::getInstance()->GetAllRadioChannels(zapitList, CZapitChannel::REMOVED);
|
||||
if (!zapitList.empty()) {
|
||||
CBouquet* newBouquet = new CBouquet(0, g_Locale->getText(LOCALE_BOUQUETNAME_REMOVED), false, true);
|
||||
newBouquet->channelList->SetChannelList(&zapitList);
|
||||
RADIOfavList->Bouquets.push_back(newBouquet);
|
||||
printf("[neutrino] got %d removed RADIO channels\n", zapitList.size()); fflush(stdout);
|
||||
}
|
||||
|
||||
printf("[neutrino] got %d RADIO bouquets\n", bnum); fflush(stdout);
|
||||
TIMER_STOP("[neutrino] took");
|
||||
|
||||
@@ -2888,7 +2913,7 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode)
|
||||
if(do_shutdown) {
|
||||
if(SDTreloadChannels){
|
||||
SDT_ReloadChannels();
|
||||
SDTreloadChannels = false;
|
||||
//SDTreloadChannels = false;
|
||||
}
|
||||
|
||||
CVFD::getInstance()->setMode(CVFD::MODE_SHUTDOWN);
|
||||
@@ -3166,7 +3191,7 @@ void CNeutrinoApp::standbyMode( bool bOnOff )
|
||||
StopSubtitles();
|
||||
if(SDTreloadChannels && !CRecordManager::getInstance()->RecordingStatus()){
|
||||
SDT_ReloadChannels();
|
||||
SDTreloadChannels = false;
|
||||
//SDTreloadChannels = false;
|
||||
}
|
||||
frameBuffer->useBackground(false);
|
||||
frameBuffer->paintBackground();
|
||||
@@ -3810,9 +3835,11 @@ void CNeutrinoApp::SelectSubtitles()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CNeutrinoApp::SDT_ReloadChannels()
|
||||
{
|
||||
g_Zapit->reinitChannels();
|
||||
SDTreloadChannels = false;
|
||||
//g_Zapit->reinitChannels();
|
||||
channelsInit();
|
||||
t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID();
|
||||
channelList->adjustToChannelID(live_channel_id);//FIXME what if deleted ?
|
||||
@@ -3821,5 +3848,4 @@ void CNeutrinoApp::SDT_ReloadChannels()
|
||||
old_b_id = -1;
|
||||
g_RCInput->postMsg(CRCInput::RC_ok, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user