mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 17:31:11 +02:00
eitd/SIevents.cpp: fix userClassification, dont save undefined content
Origin commit data
------------------
Commit: e25f111928
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-02-27 (Mon, 27 Feb 2012)
This commit is contained in:
@@ -105,7 +105,7 @@ void SIevent::parse(Event &event)
|
|||||||
char content = c->getContentNibbleLevel1() << 4 | c->getContentNibbleLevel2();
|
char content = c->getContentNibbleLevel1() << 4 | c->getContentNibbleLevel2();
|
||||||
contentClassification += content;
|
contentClassification += content;
|
||||||
char user = c->getUserNibble1() << 4 | c->getUserNibble2();
|
char user = c->getUserNibble1() << 4 | c->getUserNibble2();
|
||||||
contentClassification += user;
|
userClassification += user;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(dtype == COMPONENT_DESCRIPTOR) {
|
else if(dtype == COMPONENT_DESCRIPTOR) {
|
||||||
@@ -313,8 +313,11 @@ int SIevent::saveXML2(FILE *file) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for_each(times.begin(), times.end(), saveSItimeXML(file));
|
for_each(times.begin(), times.end(), saveSItimeXML(file));
|
||||||
for(unsigned i=0; i<contentClassification.length(); i++)
|
for(unsigned i=0; i<contentClassification.length(); i++) {
|
||||||
fprintf(file, "\t\t\t<content class=\"%02x\" user=\"%02x\"/>\n", contentClassification[i], userClassification[i]);
|
/* focus: i think no sense to save 'unknown' */
|
||||||
|
if(contentClassification[i] || userClassification[i])
|
||||||
|
fprintf(file, "\t\t\t<content class=\"%02x\" user=\"%02x\"/>\n", contentClassification[i], userClassification[i]);
|
||||||
|
}
|
||||||
for_each(components.begin(), components.end(), saveSIcomponentXML(file));
|
for_each(components.begin(), components.end(), saveSIcomponentXML(file));
|
||||||
for_each(ratings.begin(), ratings.end(), saveSIparentalRatingXML(file));
|
for_each(ratings.begin(), ratings.end(), saveSIparentalRatingXML(file));
|
||||||
for_each(linkage_descs.begin(), linkage_descs.end(), saveSIlinkageXML(file));
|
for_each(linkage_descs.begin(), linkage_descs.end(), saveSIlinkageXML(file));
|
||||||
|
Reference in New Issue
Block a user