mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 10:21:04 +02:00
api4 : fix value assignment to write_names
Origin commit data
------------------
Commit: 04be550075
Author: Janus <janus@debian>
Date: 2014-10-31 (Fri, 31 Oct 2014)
This commit is contained in:
@@ -1894,6 +1894,9 @@ TIMER_START();
|
|||||||
|
|
||||||
/* create decoders, read channels */
|
/* create decoders, read channels */
|
||||||
bool zapit_init = CZapit::getInstance()->Start(&ZapStart_arg);
|
bool zapit_init = CZapit::getInstance()->Start(&ZapStart_arg);
|
||||||
|
//get zapit config for writeChannelsNames
|
||||||
|
CZapit::getInstance()->GetConfig(zapitCfg);
|
||||||
|
|
||||||
// init audio settings
|
// init audio settings
|
||||||
audioDecoder->SetSRS(g_settings.srs_enable, g_settings.srs_nmgr_enable, g_settings.srs_algo, g_settings.srs_ref_volume);
|
audioDecoder->SetSRS(g_settings.srs_enable, g_settings.srs_nmgr_enable, g_settings.srs_algo, g_settings.srs_ref_volume);
|
||||||
//audioDecoder->setVolume(g_settings.current_volume, g_settings.current_volume);
|
//audioDecoder->setVolume(g_settings.current_volume, g_settings.current_volume);
|
||||||
|
@@ -351,26 +351,25 @@ void CZapitChannel::dumpServiceXml(FILE * fd, const char * action)
|
|||||||
|
|
||||||
void CZapitChannel::dumpBouquetXml(FILE * fd, bool bUser)
|
void CZapitChannel::dumpBouquetXml(FILE * fd, bool bUser)
|
||||||
{
|
{
|
||||||
// TODO : gui->manage configuration: write names (if nessessary or wanted)
|
// TODO : gui->manage configuration: writeChannelsNames (if nessessary or wanted) in zapit.conf
|
||||||
// menu > installation > Servicesscan > under 'Bouquet' => "Write DVB-names in bouquets:" f.e. =>0=never 1=ubouquets 2=bouquets 3=both
|
// 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;
|
int write_names = zapitCfg.writeChannelsNames;
|
||||||
|
|
||||||
fprintf(fd, "\t\t<S");
|
fprintf(fd, "\t\t<S");
|
||||||
|
|
||||||
// references
|
// references (mandatory)
|
||||||
if (url.empty())
|
if (url.empty())
|
||||||
fprintf(fd, " i=\"%x\" t=\"%x\" on=\"%x\" s=\"%hd\" frq=\"%hd\"",getServiceId(), getTransportStreamId(), getOriginalNetworkId(), getSatellitePosition(), getFreqId());
|
fprintf(fd, " i=\"%x\" t=\"%x\" on=\"%x\" s=\"%hd\" frq=\"%hd\"",getServiceId(), getTransportStreamId(), getOriginalNetworkId(), getSatellitePosition(), getFreqId());
|
||||||
else
|
else
|
||||||
fprintf(fd, " u=\"%s\"",convert_UTF8_To_UTF8_XML(url.c_str()).c_str());
|
fprintf(fd, " u=\"%s\"",convert_UTF8_To_UTF8_XML(url.c_str()).c_str());
|
||||||
|
|
||||||
// service descriptors
|
// service names
|
||||||
if (bUser || !url.empty()) {
|
if (bUser || !url.empty()) {
|
||||||
if ((write_names==0x01) || (write_names==0x03))
|
if ((write_names & 0x01) ==0x01)
|
||||||
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());
|
||||||
//fprintf(fd, " n=\"%s\"", convert_UTF8_To_UTF8_XML(name.c_str()).c_str());
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ((write_names==0x02) || (write_names==0x03))
|
if ((write_names & 0x02) == 0x02)
|
||||||
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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user