From ef23e50d2f52811196f53142847655f08950c35e Mon Sep 17 00:00:00 2001 From: Klaas de Waal Date: Wed, 4 Dec 2024 20:53:47 +0100 Subject: [PATCH] Add EXTINF format Add a simple EXTINF format in the IPTV channel fetcher that can parse the format "EXTINF:0,Channel_Title". Refs #936 --- .../libmythtv/channelscan/iptvchannelfetcher.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/mythtv/libs/libmythtv/channelscan/iptvchannelfetcher.cpp b/mythtv/libs/libmythtv/channelscan/iptvchannelfetcher.cpp index 0db23b9ef8b..45c344dc2b4 100644 --- a/mythtv/libs/libmythtv/channelscan/iptvchannelfetcher.cpp +++ b/mythtv/libs/libmythtv/channelscan/iptvchannelfetcher.cpp @@ -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);