mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-03 19:01:25 +02:00
zapit/src/scan.cpp: add flag to check if scanned sat has channels
This commit is contained in:
@@ -65,6 +65,7 @@ class CServiceScan : public OpenThreads::Thread
|
||||
scan_type_t scan_mode;
|
||||
int flags;
|
||||
void * scan_arg;
|
||||
bool satHaveChannels;
|
||||
|
||||
uint32_t fake_tid, fake_nid;
|
||||
uint32_t found_transponders;
|
||||
@@ -90,6 +91,7 @@ class CServiceScan : public OpenThreads::Thread
|
||||
bool ReadNitSdt(t_satellite_position satellitePosition);
|
||||
void FixServiceTypes();
|
||||
|
||||
void CheckSatelliteChannels(t_satellite_position satellitePosition);
|
||||
bool ScanTransponder();
|
||||
bool ScanProviders();
|
||||
void SaveServices();
|
||||
@@ -136,6 +138,7 @@ class CServiceScan : public OpenThreads::Thread
|
||||
void SetCableNID(unsigned short nid) { cable_nid = nid; }
|
||||
bool isFtaOnly() { return flags & SCAN_FTA; }
|
||||
int GetFlags() { return flags; }
|
||||
bool SatHaveChannels() { return satHaveChannels; }
|
||||
};
|
||||
|
||||
#endif /* __scan_h__ */
|
||||
|
@@ -279,7 +279,6 @@ _repeat:
|
||||
if(flags & SCAN_BAT)
|
||||
bat.Start();
|
||||
#endif
|
||||
|
||||
CSdt sdt(satellitePosition, freq);
|
||||
bool sdt_parsed = sdt.Parse(tI->second.transport_stream_id, tI->second.original_network_id);
|
||||
|
||||
@@ -536,6 +535,15 @@ bool CServiceScan::SetFrontend(t_satellite_position satellitePosition)
|
||||
return true;
|
||||
}
|
||||
|
||||
void CServiceScan::CheckSatelliteChannels(t_satellite_position satellitePosition)
|
||||
{
|
||||
satHaveChannels = false;
|
||||
|
||||
ZapitChannelList zapitList;
|
||||
if(CServiceManager::getInstance()->GetAllSatelliteChannels(zapitList, satellitePosition))
|
||||
satHaveChannels = true;
|
||||
}
|
||||
|
||||
void CServiceScan::SaveServices()
|
||||
{
|
||||
#if 0 // old
|
||||
@@ -626,6 +634,9 @@ bool CServiceScan::ScanProviders()
|
||||
scanedtransponders.clear();
|
||||
nittransponders.clear();
|
||||
|
||||
/* set satHaveChannels flag so SDT can mark channels as NEW only if
|
||||
* this is not first satellite scan */
|
||||
CheckSatelliteChannels(position);
|
||||
printf("[scan] scanning %s at %d bouquetMode %d\n", providerName, position, bouquetMode);
|
||||
ScanProvider(search, position, diseqc_pos);
|
||||
if(abort_scan) {
|
||||
@@ -669,6 +680,7 @@ bool CServiceScan::ScanTransponder()
|
||||
Cleanup(false);
|
||||
return false;
|
||||
}
|
||||
CheckSatelliteChannels(satellitePosition);
|
||||
|
||||
scanBouquetManager = new CBouquetManager();
|
||||
|
||||
|
Reference in New Issue
Block a user