Skip to content

Commit

Permalink
channelutil.cpp: fix channel count if visible is 'Always Visible'
Browse files Browse the repository at this point in the history
As each channel was counted, the value was incremented by the contents of
the visible field, which is OK for kChannelVisible (1). But when marked
kChannelAlwaysVisible (2), the count was bumped by two causing the following
warning log entry:

    ... Found multiple visible channels for <some name>, using chanid <some id>
  • Loading branch information
Bill Meek committed Sep 17, 2023
1 parent f818bef commit 8b610e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mythtv/libs/libmythtv/channelutil.cpp
Expand Up @@ -1960,11 +1960,13 @@ bool ChannelUtil::GetChannelData(
: query.value(8).toInt();
chanid = query.value(9).toUInt();

found += query.value(10).toInt();
if (query.value(10).toInt() > kChannelNotVisible)
found++;
}

while (query.next())
found += query.value(10).toInt();
if (query.value(10).toInt() > kChannelNotVisible)
found++;

if (found == 0 && chanid)
{
Expand Down

0 comments on commit 8b610e8

Please sign in to comment.