neutrino: allow empty user bouquets in the bouquetlist

This commit is contained in:
Stefan Seyfried
2013-03-10 00:27:13 +01:00
committed by Jacek Jendrzej
parent f8aacb7a10
commit d0f9836173

View File

@@ -1307,14 +1307,17 @@ void CNeutrinoApp::channelsInit(bool bOnly)
/* Favorites and providers TV bouquets */ /* Favorites and providers TV bouquets */
bnum = 0; bnum = 0;
for (i = 0; i < g_bouquetManager->Bouquets.size(); i++) { for (i = 0; i < g_bouquetManager->Bouquets.size(); i++) {
if (!g_bouquetManager->Bouquets[i]->bHidden && !g_bouquetManager->Bouquets[i]->tvChannels.empty()) CZapitBouquet *b = g_bouquetManager->Bouquets[i];
/* allow empty user bouquets to be added, otherwise they are not
* available from the channellist->add_favorite context menus */
if (!b->bHidden && (!b->tvChannels.empty() || b->bUser))
{ {
if(g_bouquetManager->Bouquets[i]->bUser) if (b->bUser)
tmp = TVfavList->addBouquet(g_bouquetManager->Bouquets[i]); tmp = TVfavList->addBouquet(b);
else else
tmp = TVbouquetList->addBouquet(g_bouquetManager->Bouquets[i]); tmp = TVbouquetList->addBouquet(b);
ZapitChannelList* channels = &(g_bouquetManager->Bouquets[i]->tvChannels); ZapitChannelList* channels = &(b->tvChannels);
tmp->channelList->SetChannelList(channels); tmp->channelList->SetChannelList(channels);
bnum++; bnum++;
} }