mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-03 19:01:13 +02:00
zapit/src/fastscan.cpp: fix duplicate channels in favorite bouquet,
try to fix possible possible duplicates from different frequency
Origin commit data
------------------
Commit: 5fc0d256f4
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-12-04 (Tue, 04 Dec 2012)
This commit is contained in:
@@ -297,8 +297,20 @@ bool CServiceScan::ParseFst(unsigned short pid, fast_scan_operator_t * op)
|
|||||||
channel_id = CREATE_CHANNEL_ID64;
|
channel_id = CREATE_CHANNEL_ID64;
|
||||||
|
|
||||||
CZapitChannel * newchannel;
|
CZapitChannel * newchannel;
|
||||||
|
#if 0
|
||||||
newchannel = CServiceManager::getInstance()->FindChannel(channel_id);
|
newchannel = CServiceManager::getInstance()->FindChannel(channel_id);
|
||||||
|
#else
|
||||||
|
|
||||||
|
int flist[5] = { freq, freq-1, freq+1, freq-2, freq+2 };
|
||||||
|
for(int i = 0; i < 5; i++) {
|
||||||
|
freq_id_t freq_id = flist[i];
|
||||||
|
t_channel_id newid = CZapitChannel::makeChannelId(satellitePosition,
|
||||||
|
freq_id, transport_stream_id, original_network_id, service_id);
|
||||||
|
newchannel = CServiceManager::getInstance()->FindChannel(newid);
|
||||||
|
if(newchannel)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if(newchannel == NULL) {
|
if(newchannel == NULL) {
|
||||||
newchannel = new CZapitChannel (
|
newchannel = new CZapitChannel (
|
||||||
serviceName,
|
serviceName,
|
||||||
@@ -338,9 +350,12 @@ bool CServiceScan::ParseFst(unsigned short pid, fast_scan_operator_t * op)
|
|||||||
bouquetId = g_bouquetManager->existsUBouquet(op->name);
|
bouquetId = g_bouquetManager->existsUBouquet(op->name);
|
||||||
if (bouquetId == -1) {
|
if (bouquetId == -1) {
|
||||||
bouquet = g_bouquetManager->addBouquet(std::string(op->name), true);
|
bouquet = g_bouquetManager->addBouquet(std::string(op->name), true);
|
||||||
|
bouquetId = g_bouquetManager->existsUBouquet(op->name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
bouquet = g_bouquetManager->Bouquets[bouquetId];
|
bouquet = g_bouquetManager->Bouquets[bouquetId];
|
||||||
|
|
||||||
|
if (!(g_bouquetManager->existsChannelInBouquet(bouquetId, newchannel->getChannelID())))
|
||||||
bouquet->addService(newchannel);
|
bouquet->addService(newchannel);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user