Skip to content

Commit

Permalink
Remove the 'grouping' behaviour from XMLTV Parser.
Browse files Browse the repository at this point in the history
This isn't within the XMLTV spec, it doesn't actually group anything
it just mangles titles and has the very real potential to do so
accidentally and without explanation to the end-user. This doesn't
affect or relate to the in-spec clumpidx handling which was added in the same
commit 9 years ago.
  • Loading branch information
stuartm committed Apr 4, 2013
1 parent ff5ab27 commit 460f77c
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions mythtv/programs/mythfilldatabase/xmltvparser.cpp
Expand Up @@ -604,8 +604,6 @@ bool XMLTVParser::parseFile(

QString aggregatedTitle;
QString aggregatedDesc;
QString groupingTitle;
QString groupingDesc;

QDomNode n = docElem.firstChild();
while (!n.isNull())
Expand All @@ -626,31 +624,15 @@ bool XMLTVParser::parseFile(

if (pginfo->startts == pginfo->endts)
{
/* Not a real program : just a grouping marker */
if (!pginfo->title.isEmpty())
groupingTitle = pginfo->title + " : ";

if (!pginfo->description.isEmpty())
groupingDesc = pginfo->description + " : ";
LOG(VB_GENERAL, LOG_WARNING, QString("Invalid programme (%1), "
"identical start and end "
"times, skipping")
.arg(pginfo->title));
}
else
{
if (pginfo->clumpidx.isEmpty())
{
if (!groupingTitle.isEmpty())
{
pginfo->title.prepend(groupingTitle);
groupingTitle.clear();
}

if (!groupingDesc.isEmpty())
{
pginfo->description.prepend(groupingDesc);
groupingDesc.clear();
}

(*proglist)[pginfo->channel].push_back(*pginfo);
}
else
{
/* append all titles/descriptions from one clump */
Expand Down

0 comments on commit 460f77c

Please sign in to comment.