Skip to content

Commit 14eca40

Browse files
authored
Merge pull request #1950 from dimkroon/fix/npo_iptv_epg
Fixed: non-playable NPO IPTV streams.
2 parents 2da6a1a + 5520312 commit 14eca40

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

channels/channel.nos/nos2010/chn_nos2010.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,13 +1340,17 @@ def create_iptv_streams(self, parameter_parser):
13401340
}
13411341

13421342
for livestream in channel_data.json:
1343+
item_name = JsonHelper.get_from(livestream, "title")
1344+
if item_name not in logo_sources:
1345+
continue
1346+
13431347
item = self.create_api_live_tv(livestream)
13441348
items.append(item)
13451349

13461350
iptv_streams.append(dict(
13471351
id=JsonHelper.get_from(livestream, "guid"),
1348-
name=JsonHelper.get_from(livestream, "title"),
1349-
logo=logo_sources.get(JsonHelper.get_from(livestream, "title"), ""),
1352+
name=item_name,
1353+
logo=logo_sources[item_name],
13501354
group=self.channelName,
13511355
stream=parameter_parser.create_action_url(self, action=action.PLAY_VIDEO, item=item,
13521356
store_id=parent_item.guid),

tests/channel_tests/test_chn_nos2010.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,13 @@ def test_page(self):
127127
def test_update_stream_pow(self):
128128
url = "KN_1693383"
129129
self._test_video_url(url)
130+
131+
def test_iptv_streams(self):
132+
from resources.lib.plugin import Plugin
133+
result = self.channel.create_iptv_streams(Plugin('plugin.video.restrospect', ''))
134+
self.assertEqual(len(result), 6)
135+
136+
def test_iptv_epg(self):
137+
from resources.lib.plugin import Plugin
138+
result = self.channel.create_iptv_epg(Plugin('plugin.video.restrospect', ''))
139+
self.assertGreaterEqual(len(result), 6)

0 commit comments

Comments
 (0)