Skip to content

Commit 62ad21b

Browse files
committed
IPTV m3u channel import with USA channel numbers
Allow IPTV m3u channel importing from HDHomeRun tuners to insert channels with decimals, such as "2.1" or "23.11" The validation of HDHomeRun channel numbers is changed to allow any non-empty string as channel number instead of only an integer number. Refs #860
1 parent 59e4f3c commit 62ad21b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mythtv/libs/libmythtv/channelscan/iptvchannelfetcher.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -536,16 +536,15 @@ static bool parse_extinf(const QString &line,
536536

537537
// Parse extension, HDHomeRun style
538538
// EG. #EXTINF:-1 channel-id="22" channel-number="22" tvg-name="Omroep Brabant",22 Omroep Brabant
539+
// #EXTINF:-1 channel-id="2.1" channel-number="2.1" tvg-name="CBS2-HD",2.1 CBS2-HD
539540
static const QRegularExpression chanNumName6
540541
{ R"(^-?\d+\s+channel-id=\"([^\"]+)\"\s+channel-number=\"([^\"]+)\"\s+tvg-name=\"([^\"]+)\".*$)" };
541542
match = chanNumName6.match(line);
542543
if (match.hasMatch())
543544
{
544545
channum = match.captured(2).simplified();
545546
name = match.captured(3).simplified();
546-
bool ok = false;
547-
int channel_number = channum.toInt (&ok);
548-
if (ok && (channel_number > 0))
547+
if (!channum.isEmpty() && !name.isEmpty())
549548
{
550549
return true;
551550
}

0 commit comments

Comments
 (0)