zapit/src/bouquets.cpp: add bouquet flag to select bouquet for epg scan

Origin commit data
------------------
Branch: ni/coolstream
Commit: 37cf3482b7
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2014-03-27 (Thu, 27 Mar 2014)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2014-03-27 18:48:36 +04:00
parent 679fb5be60
commit 52f6f77bcc
2 changed files with 6 additions and 4 deletions

View File

@@ -36,12 +36,13 @@ class CZapitBouquet
bool bUser;
bool bFav;
bool bOther;
int bScanEpg;
t_satellite_position satellitePosition;
ZapitChannelList radioChannels;
ZapitChannelList tvChannels;
inline CZapitBouquet(const std::string name) { Name = name; bHidden = false; bLocked = false; bUser = true; }
inline CZapitBouquet(const std::string name) { Name = name; bHidden = false; bLocked = false; bUser = false; bOther = false; bScanEpg = false; }
void addService(CZapitChannel* newChannel);

View File

@@ -211,8 +211,8 @@ CBouquetManager::~CBouquetManager()
void CBouquetManager::writeBouquetHeader(FILE * bouq_fd, uint32_t i, const char * bouquetName)
{
//printf("[bouquets] writing bouquet header: %s\n", bouquetName);
fprintf(bouq_fd, "\t<Bouquet name=\"%s\" hidden=\"%d\" locked=\"%d\">\n",
bouquetName, Bouquets[i]->bHidden ? 1 : 0, Bouquets[i]->bLocked ? 1 : 0);
fprintf(bouq_fd, "\t<Bouquet name=\"%s\" hidden=\"%d\" locked=\"%d\" epg=\"%d\">\n",
bouquetName, Bouquets[i]->bHidden ? 1 : 0, Bouquets[i]->bLocked ? 1 : 0, Bouquets[i]->bScanEpg ? 1 : 0);
}
void CBouquetManager::writeBouquetFooter(FILE * bouq_fd)
@@ -374,9 +374,11 @@ void CBouquetManager::parseBouquetsXml(const char *fname, bool bUser)
CZapitBouquet* newBouquet = addBouquet(name, bUser);
char* hidden = xmlGetAttribute(search, "hidden");
char* locked = xmlGetAttribute(search, "locked");
char* scanepg = xmlGetAttribute(search, "epg");
newBouquet->bHidden = hidden ? (strcmp(hidden, "1") == 0) : false;
newBouquet->bLocked = locked ? (strcmp(locked, "1") == 0) : false;
newBouquet->bFav = (strcmp(name, "favorites") == 0);
newBouquet->bScanEpg = scanepg ? (strcmp(scanepg, "1") == 0) : false;
channel_node = search->xmlChildrenNode;
while ((channel_node = xmlGetNextOccurence(channel_node, "S")) != NULL) {
std::string name2 = xmlGetAttribute(channel_node, "n");
@@ -514,7 +516,6 @@ CZapitBouquet* CBouquetManager::addBouquet(const std::string & name, bool ub, bo
CZapitBouquet* newBouquet = new CZapitBouquet(myfav ? "favorites" : name);
newBouquet->bUser = ub;
newBouquet->bFav = myfav;
newBouquet->bOther = false;
newBouquet->satellitePosition = INVALID_SAT_POSITION;
//printf("CBouquetManager::addBouquet: %s, user %s\n", name.c_str(), ub ? "YES" : "NO");