Skip to content

Commit

Permalink
Default channel number for IPTV channel scan
Browse files Browse the repository at this point in the history
When the IPTV channel scan does not contain a channel number for a
channel then a default channel number is used. This is the first
unused channel number in the database for that video source.
The code for this looks at all channels, but the channels that
have been deleted should be excluded. This is now fixed.

Refs #936
Refs #973
  • Loading branch information
kmdewaal committed Nov 30, 2024
1 parent 0b5733e commit 80f447c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mythtv/libs/libmythtv/channelscan/iptvchannelfetcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ fbox_chan_map_t IPTVChannelFetcher::ParsePlaylist(
if (fetcher)
{
MSqlQuery query(MSqlQuery::InitCon());
QString sql = "select MAX(CONVERT(channum, UNSIGNED INTEGER)) from channel where sourceid = :SOURCEID;";
QString sql = "SELECT MAX(CONVERT(channum, UNSIGNED INTEGER)) FROM channel "
"WHERE sourceid = :SOURCEID AND deleted IS NULL";

query.prepare(sql);
query.bindValue(":SOURCEID", fetcher->m_sourceId);
Expand Down

0 comments on commit 80f447c

Please sign in to comment.