Skip to content

Commit

Permalink
Do not display hidden channels
Browse files Browse the repository at this point in the history
  • Loading branch information
flubshi committed May 6, 2019
1 parent c6d131a commit 81f5543
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pvr.waipu/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.waipu"
version="1.0.1"
version="1.0.2"
name="waipu.tv PVR Client"
provider-name="flubshi">
<requires>@ADDON_DEPENDS@</requires>
Expand All @@ -26,6 +26,7 @@
<screenshot>resources/screenshots/screenshot-02.jpg</screenshot>
</assets>
<news>
- 1.0.2 Do not show hidden channels
- 1.0.1 Code cleanup: remove usage of kodi-platform
- 1.0.0 Fix windows build
- 0.5.0 Update to PVR addon API v6.0.0
Expand Down
9 changes: 9 additions & 0 deletions src/WaipuData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,15 @@ bool WaipuData::LoadChannelData(void)
if (find(m_user_channels.begin(), m_user_channels.end(), waipuid.c_str()) == m_user_channels.end())
continue;

// check if user has hidden this channel
if(channel.HasMember("properties") && channel["properties"].IsArray()){
bool skipChannel = false;
for(auto& prop : channel["properties"].GetArray())
skipChannel |= (prop.GetString() == string("UserSetHidden"));
if(skipChannel)
continue;
}

++i;
WaipuChannel waipu_channel;
waipu_channel.iChannelNumber = i; //position
Expand Down

0 comments on commit 81f5543

Please sign in to comment.