Skip to content

Commit bee5bd9

Browse files
authored
Improve coverage (#818)
This properly indents addon.xml and adds missing coverage.
1 parent 1e04361 commit bee5bd9

3 files changed

Lines changed: 53 additions & 38 deletions

File tree

addon.xml

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<addon id="plugin.video.vrt.nu" name="VRT NU" version="2.4.0" provider-name="Martijn Moreel, dagwieers">
3-
<requires>
4-
<import addon="resource.images.studios.white" version="0.0.22"/>
5-
<import addon="script.module.beautifulsoup4" version="4.6.2"/>
6-
<import addon="script.module.dateutil" version="2.8.0"/>
7-
<import addon="script.module.inputstreamhelper" version="0.4.3"/>
8-
<import addon="script.module.routing" version="0.2.3"/>
9-
<import addon="xbmc.python" version="2.25.0"/>
10-
</requires>
11-
<extension point="xbmc.python.pluginsource" library="resources/lib/addon_entry.py">
12-
<provides>video</provides>
13-
</extension>
14-
<extension point="xbmc.service" library="resources/lib/service_entry.py"/>
15-
<extension point="xbmc.addon.metadata">
16-
<summary lang="en_GB">Watch videos from VRT NU</summary>
17-
<description lang="en_GB">VRT NU is the video-on-demand platform of the Flemish public broadcaster (VRT).
3+
<requires>
4+
<import addon="resource.images.studios.white" version="0.0.22"/>
5+
<import addon="script.module.beautifulsoup4" version="4.6.2"/>
6+
<import addon="script.module.dateutil" version="2.8.0"/>
7+
<import addon="script.module.inputstreamhelper" version="0.4.3"/>
8+
<import addon="script.module.routing" version="0.2.3"/>
9+
<import addon="xbmc.python" version="2.25.0"/>
10+
</requires>
11+
<extension point="xbmc.python.pluginsource" library="resources/lib/addon_entry.py">
12+
<provides>video</provides>
13+
</extension>
14+
<extension point="xbmc.service" library="resources/lib/service_entry.py"/>
15+
<extension point="xbmc.addon.metadata">
16+
<summary lang="en_GB">Watch videos from VRT NU</summary>
17+
<description lang="en_GB">VRT NU is the video-on-demand platform of the Flemish public broadcaster (VRT).
1818

1919
- Track the programs you like
2020
- List all videos alphabetically by program, category, channel or feature
@@ -23,9 +23,9 @@
2323
- Browse the online TV guides or search VRT NU
2424

2525
[I]The VRT NU add-on is not endorsed by VRT, and is provided 'as is' without any warranty of any kind.[/I]</description>
26-
<disclaimer lang="en_GB">The VRT NU add-on is not endorsed by VRT, and is provided 'as is' without any warranty of any kind.</disclaimer>
27-
<summary lang="nl_NL">VRT NU videos bekijken.</summary>
28-
<description lang="nl_NL">VRT NU is het video-on-demand platform van de Vlaamse publieke omroep (VRT).
26+
<disclaimer lang="en_GB">The VRT NU add-on is not endorsed by VRT, and is provided 'as is' without any warranty of any kind.</disclaimer>
27+
<summary lang="nl_NL">VRT NU videos bekijken.</summary>
28+
<description lang="nl_NL">VRT NU is het video-on-demand platform van de Vlaamse publieke omroep (VRT).
2929

3030
- Volg je favoriete tv-programma's
3131
- Raadpleeg video's op basis van programma, categorie, kanaal of feature
@@ -34,14 +34,14 @@
3434
- Doorblader de online tv-gids of doorzoek VRT NU
3535

3636
[I]Deze VRT NU add-on wordt niet ondersteund door de VRT, en wordt aangeboden 'as is', zonder enige garantie.[/I]</description>
37-
<disclaimer lang="nl_NL">Deze VRT NU add-on wordt niet ondersteund door de VRT, en wordt aangeboden 'as is', zonder enige garantie.</disclaimer>
38-
<language>en nl</language>
39-
<platform>all</platform>
40-
<license>GPL-3.0-only</license>
41-
<forum>https://www.facebook.com/kodivrtnu/</forum>
42-
<website>https://github.com/add-ons/plugin.video.vrt.nu/wiki</website>
43-
<source>https://github.com/add-ons/plugin.video.vrt.nu</source>
44-
<news>
37+
<disclaimer lang="nl_NL">Deze VRT NU add-on wordt niet ondersteund door de VRT, en wordt aangeboden 'as is', zonder enige garantie.</disclaimer>
38+
<language>en nl</language>
39+
<platform>all</platform>
40+
<license>GPL-3.0-only</license>
41+
<forum>https://www.facebook.com/kodivrtnu/</forum>
42+
<website>https://github.com/add-ons/plugin.video.vrt.nu/wiki</website>
43+
<source>https://github.com/add-ons/plugin.video.vrt.nu</source>
44+
<news>
4545
v2.4.0 (2020-07-18)
4646
- Show error messages when connections fail
4747
- Improve user authentication cache
@@ -80,15 +80,15 @@ v2.3.1 (2020-01-14)
8080
- Small fix for livestreams
8181
- Improvements to metadata handling specific to Kodi rendering
8282
- Support multiple YouTube links per channel
83-
</news>
84-
<assets>
85-
<icon>resources/media/icon.png</icon>
86-
<fanart>resources/media/fanart.png</fanart>
87-
<screenshot>resources/media/screenshot01.jpg</screenshot>
88-
<screenshot>resources/media/screenshot02.jpg</screenshot>
89-
<screenshot>resources/media/screenshot03.jpg</screenshot>
90-
<screenshot>resources/media/screenshot04.jpg</screenshot>
91-
</assets>
92-
<reuselanguageinvoker>true</reuselanguageinvoker>
93-
</extension>
83+
</news>
84+
<assets>
85+
<icon>resources/media/icon.png</icon>
86+
<fanart>resources/media/fanart.png</fanart>
87+
<screenshot>resources/media/screenshot01.jpg</screenshot>
88+
<screenshot>resources/media/screenshot02.jpg</screenshot>
89+
<screenshot>resources/media/screenshot03.jpg</screenshot>
90+
<screenshot>resources/media/screenshot04.jpg</screenshot>
91+
</assets>
92+
<reuselanguageinvoker>true</reuselanguageinvoker>
93+
</extension>
9494
</addon>

resources/lib/apihelper.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ def list_tvshows(self, category=None, channel=None, feature=None, use_favorites=
7878

7979
def tvshow_to_listitem(self, tvshow, program, cache_file):
8080
"""Return a ListItem based on a Suggests API result"""
81-
8281
label = self._metadata.get_label(tvshow)
8382

8483
if program:

tests/test_routing.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,22 @@ def test_play_upnext_route(self):
265265
addon.run(['plugin://plugin.video.vrt.nu/play/upnext/vid-a39ab219-9598-4a79-b676-98b724cceff1', '0', ''])
266266
self.assertEqual(plugin.url_for(addon.play_upnext, video_id='vid-a39ab219-9598-4a79-b676-98b724cceff1'), 'plugin://plugin.video.vrt.nu/play/upnext/vid-a39ab219-9598-4a79-b676-98b724cceff1')
267267

268+
def test_play_whatson_id(self):
269+
"""Play video by whatsonid method: /play/whatson/<whatson_id>"""
270+
# Pano S2018E05 is available until 9999-12-31
271+
addon.run(['plugin://plugin.video.vrt.nu/play/whatson/490431755527', '0', ''])
272+
self.assertEqual(plugin.url_for(addon.play_whatson_id, whatson_id='490431755527'), 'plugin://plugin.video.vrt.nu/play/whatson/490431755527')
273+
274+
def test_update_repos(self):
275+
"""Update repositories: /update/repos"""
276+
addon.run(['plugin://plugin.video.vrt.nu/update/repos', '0', ''])
277+
self.assertEqual(plugin.url_for(addon.update_repos), 'plugin://plugin.video.vrt.nu/update/repos')
278+
279+
def test_show_settings_addons(self):
280+
"""Open the Kodi System settings: /show/settings/addons"""
281+
addon.run(['plugin://plugin.video.vrt.nu/show/settings/addons', '0', ''])
282+
self.assertEqual(plugin.url_for(addon.show_settings_addons), 'plugin://plugin.video.vrt.nu/show/settings/addons')
283+
268284

269285
if __name__ == '__main__':
270286
unittest.main()

0 commit comments

Comments
 (0)