mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 09:21:18 +02:00
zapit/src/bouquets.cpp: allow to change GUI channel name in ubouquets.xml;
avoid delete remainChannels bouquet
This commit is contained in:
@@ -117,6 +117,7 @@ class CZapitChannel
|
||||
private:
|
||||
/* channel name */
|
||||
std::string name;
|
||||
std::string uname;
|
||||
|
||||
/* WebTV */
|
||||
std::string url;
|
||||
@@ -215,7 +216,7 @@ class CZapitChannel
|
||||
|
||||
|
||||
/* get methods - read and write variables */
|
||||
const std::string& getName(void) const { return name; }
|
||||
const std::string& getName(void) const { return (!uname.empty() ? uname : name); }
|
||||
const std::string& getUrl(void) const { return url; }
|
||||
const std::string& getDesc(void) const { return desc; }
|
||||
t_satellite_position getSatellitePosition(void) const { return satellitePosition; }
|
||||
@@ -240,7 +241,8 @@ class CZapitChannel
|
||||
|
||||
/* set methods */
|
||||
void setServiceType(const unsigned char pserviceType) { serviceType = pserviceType; }
|
||||
inline void setName(const std::string pName) { name = pName; }
|
||||
inline void setName(const std::string &pName) { name = pName; }
|
||||
inline void setUserName(const std::string &pName) { uname = pName; }
|
||||
void setAudioChannel(unsigned char pAudioChannel) { if (pAudioChannel < audioChannels.size()) currentAudioChannel = pAudioChannel; }
|
||||
void setPcrPid(unsigned short pPcrPid) { pcrPid = pPcrPid; }
|
||||
void setPmtPid(unsigned short pPmtPid) { pmtPid = pPmtPid; }
|
||||
|
@@ -426,10 +426,8 @@ void CBouquetManager::parseBouquetsXml(const char *fname, bool bUser)
|
||||
chan = CServiceManager::getInstance()->FindChannel(chid);
|
||||
if (chan != NULL) {
|
||||
DBG("%04x %04x %04x %s\n", transport_stream_id, original_network_id, service_id, xmlGetAttribute(channel_node, "n"));
|
||||
#if 0
|
||||
if(bUser && (name2.length() > 1))
|
||||
chan->setName(name2);
|
||||
#endif
|
||||
chan->setUserName(name2);
|
||||
if(!bUser)
|
||||
chan->pname = (char *) newBouquet->Name.c_str();
|
||||
chan->bLocked = clock;
|
||||
@@ -517,7 +515,8 @@ void CBouquetManager::makeRemainingChannelsBouquet(void)
|
||||
sort(unusedChannels.begin(), unusedChannels.end(), CmpChannelByChName());
|
||||
|
||||
// TODO: use locales
|
||||
remainChannels = addBouquet( Bouquets.empty() ? "All Channels" : "Other", false); // UTF-8 encoded
|
||||
if (remainChannels == NULL)
|
||||
remainChannels = addBouquet( Bouquets.empty() ? "All Channels" : "Other", false); // UTF-8 encoded
|
||||
remainChannels->bOther = true;
|
||||
|
||||
for (ZapitChannelList::const_iterator it = unusedChannels.begin(); it != unusedChannels.end(); ++it) {
|
||||
@@ -531,10 +530,16 @@ void CBouquetManager::makeRemainingChannelsBouquet(void)
|
||||
|
||||
void CBouquetManager::renumServices()
|
||||
{
|
||||
#if 0
|
||||
if(remainChannels)
|
||||
deleteBouquet(remainChannels);
|
||||
|
||||
remainChannels = NULL;
|
||||
#endif
|
||||
if(remainChannels) {
|
||||
remainChannels->tvChannels.clear();
|
||||
remainChannels->radioChannels.clear();
|
||||
}
|
||||
|
||||
makeRemainingChannelsBouquet();
|
||||
}
|
||||
|
Reference in New Issue
Block a user