Skip to content

Commit

Permalink
Add EXTINF format (#985)
Browse files Browse the repository at this point in the history
Add a simple EXTINF format in the IPTV channel fetcher that can
parse the format "EXTINF:0,Channel_Title".

Refs #936
  • Loading branch information
kmdewaal authored Dec 5, 2024
1 parent 134590c commit 69b954b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions mythtv/libs/libmythtv/channelscan/iptvchannelfetcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,22 @@ static bool parse_extinf(const QString &line,
return true;
}

// #EXTINF:0,Channel Title
{
static const QRegularExpression chanNumName
{ "^(\\d+),(.*)$" };
match = chanNumName.match(line);
if (match.hasMatch())
{
channum = match.captured(1).simplified();
name = match.captured(2).simplified();

if (name.isEmpty())
return false;

return true;
}
}

// Not one of the formats we support
QString msg = LOC + QString("Invalid header in channel list line \n\t\t\tEXTINF:%1").arg(line);
Expand Down

0 comments on commit 69b954b

Please sign in to comment.