Skip to content

Commit

Permalink
Channel import: do not import locked channels
Browse files Browse the repository at this point in the history
  • Loading branch information
flubshi committed Jun 26, 2024
1 parent 9972538 commit 87057f9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/WaipuData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,11 @@ bool WaipuData::LoadChannelData()
{
const auto& channel = doc[i];
const std::string waipuId = channel["stationId"].GetString();
if (channel.HasMember("locked") && channel["locked"].GetBool())
{
kodi::Log(ADDON_LOG_DEBUG, "[%s] Skip locked channel '%s'", __FUNCTION__, waipuId.c_str());
continue;
}

const auto& stationConfig =
std::find_if(stationConfigs.begin(), stationConfigs.end(),
Expand Down Expand Up @@ -1073,8 +1078,8 @@ PVR_ERROR WaipuData::GetChannelGroupMembers(const kodi::addon::PVRChannelGroup&
{
if (group.GetIsRadio())
{
kodi::Log(ADDON_LOG_ERROR,
"[%s] ERROR: Function was called with a group having 'radio: true'", __FUNCTION__);
kodi::Log(ADDON_LOG_ERROR, "[%s] ERROR: Function was called with a group having 'radio: true'",
__FUNCTION__);
return PVR_ERROR_INVALID_PARAMETERS;
}

Expand Down

0 comments on commit 87057f9

Please sign in to comment.