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