zapit/src/scan.cpp: try to fix channels save issue, when channels only present

in ubouquets but with different frequency value
This commit is contained in:
[CST] Focus
2015-01-05 10:55:57 +03:00
parent 18bc87592b
commit 0d384d610a
3 changed files with 7 additions and 2 deletions

View File

@@ -152,7 +152,6 @@ class CZapitChannel
t_transport_stream_id transport_stream_id;
t_original_network_id original_network_id;
t_satellite_position satellitePosition;
freq_id_t freq;
/* read/write properties (write possibility needed by scan) */
unsigned char serviceType;
@@ -201,6 +200,7 @@ class CZapitChannel
uint8_t polarization;
int flags;
delivery_system_t delsys;
freq_id_t freq;
/* constructor, desctructor */
CZapitChannel(const std::string & p_name, t_service_id p_sid, t_transport_stream_id p_tsid, t_original_network_id p_onid, unsigned char p_service_type, t_satellite_position p_satellite_position, freq_id_t freq);

View File

@@ -514,6 +514,7 @@ void CServiceScan::SaveServices()
if(flags & SCAN_RESET_NUMBERS)
CServiceManager::getInstance()->ResetChannelNumbers(true, true);
/* first save bouquets, next load to re-number */
g_bouquetManager->saveUBouquets();
g_bouquetManager->saveBouquets();
printf("[scan] save bouquets done\n");
/* load and renumber */

View File

@@ -323,7 +323,11 @@ bool CSdt::ParseServiceDescriptor(ServiceDescription * service, ServiceDescripto
if (channel) {
channel->setName(serviceName);
channel->setServiceType(real_type);
channel->flags = CZapitChannel::UPDATED;
channel->freq = freq_id;
if (CServiceScan::getInstance()->SatHaveChannels() && (channel->flags & CZapitChannel::NOT_FOUND))
channel->flags = CZapitChannel::NEW;
else
channel->flags = CZapitChannel::UPDATED;
} else {
channel = new CZapitChannel(serviceName, channel_id,
real_type, satellitePosition, freq_id);