diff --git a/src/zapit/src/channel.cpp b/src/zapit/src/channel.cpp index 48a3c0138..588588d69 100644 --- a/src/zapit/src/channel.cpp +++ b/src/zapit/src/channel.cpp @@ -21,8 +21,12 @@ */ #include +#include #include +extern Zapit_config zapitCfg; + + CZapitChannel::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 p_freq) { name = p_name; @@ -347,6 +351,10 @@ void CZapitChannel::dumpServiceXml(FILE * fd, const char * action) void CZapitChannel::dumpBouquetXml(FILE * fd, bool bUser) { + // TODO : gui->manage configuration: write names (if nessessary or wanted) + // menu > installation > Servicesscan > under 'Bouquet' => "Write DVB-names in bouquets:" f.e. =>0=never 1=ubouquets 2=bouquets 3=both + int write_names = zapitCfg.writeChannelsNames; + fprintf(fd, "\t\t0=never 1=ubouquets 2=bouquets 3=both - bool write_names = false; //config.getBool("writeChannelsNames", true); if (bUser || !url.empty()) { - if (write_names) + if ((write_names==0x01) || (write_names==0x03)) fprintf(fd, " n=\"%s\"", convert_UTF8_To_UTF8_XML(name.c_str()).c_str()); //fprintf(fd, " n=\"%s\"", convert_UTF8_To_UTF8_XML(name.c_str()).c_str()); } else { - if (write_names) + if ((write_names==0x02) || (write_names==0x03)) fprintf(fd, " n=\"%s\"", convert_UTF8_To_UTF8_XML(name.c_str()).c_str()); } diff --git a/src/zapit/src/zapit.cpp b/src/zapit/src/zapit.cpp index fcc647c79..0dd19637b 100644 --- a/src/zapit/src/zapit.cpp +++ b/src/zapit/src/zapit.cpp @@ -172,7 +172,7 @@ void CZapit::SaveSettings(bool write) configfile.setInt64("lastOTAChannel", last_channel_id); } - configfile.setBool("writeChannelsNames", config.writeChannelsNames); + configfile.setInt32("writeChannelsNames", config.writeChannelsNames); configfile.setBool("makeRemainingChannelsBouquet", config.makeRemainingChannelsBouquet); configfile.setInt32("feTimeout", config.feTimeout); @@ -299,6 +299,7 @@ void CZapit::LoadSettings() voltageOff = configfile.getBool("voltageOff", 0); #endif config.saveLastChannel = configfile.getBool("saveLastChannel", true); + config.writeChannelsNames = configfile.getInt32("writeChannelsNames", 1); /* FIXME Channels renum should be done for all channels atm. TODO*/ //config.makeRemainingChannelsBouquet = configfile.getBool("makeRemainingChannelsBouquet", 1); config.makeRemainingChannelsBouquet = 1;