Skip to content

Commit

Permalink
Improve coverage (#818)
Browse files Browse the repository at this point in the history
This properly indents addon.xml and adds missing coverage.
  • Loading branch information
dagwieers authored Sep 28, 2020
1 parent 1e04361 commit bee5bd9
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 38 deletions.
74 changes: 37 additions & 37 deletions addon.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.vrt.nu" name="VRT NU" version="2.4.0" provider-name="Martijn Moreel, dagwieers">
<requires>
<import addon="resource.images.studios.white" version="0.0.22"/>
<import addon="script.module.beautifulsoup4" version="4.6.2"/>
<import addon="script.module.dateutil" version="2.8.0"/>
<import addon="script.module.inputstreamhelper" version="0.4.3"/>
<import addon="script.module.routing" version="0.2.3"/>
<import addon="xbmc.python" version="2.25.0"/>
</requires>
<extension point="xbmc.python.pluginsource" library="resources/lib/addon_entry.py">
<provides>video</provides>
</extension>
<extension point="xbmc.service" library="resources/lib/service_entry.py"/>
<extension point="xbmc.addon.metadata">
<summary lang="en_GB">Watch videos from VRT NU</summary>
<description lang="en_GB">VRT NU is the video-on-demand platform of the Flemish public broadcaster (VRT).
<requires>
<import addon="resource.images.studios.white" version="0.0.22"/>
<import addon="script.module.beautifulsoup4" version="4.6.2"/>
<import addon="script.module.dateutil" version="2.8.0"/>
<import addon="script.module.inputstreamhelper" version="0.4.3"/>
<import addon="script.module.routing" version="0.2.3"/>
<import addon="xbmc.python" version="2.25.0"/>
</requires>
<extension point="xbmc.python.pluginsource" library="resources/lib/addon_entry.py">
<provides>video</provides>
</extension>
<extension point="xbmc.service" library="resources/lib/service_entry.py"/>
<extension point="xbmc.addon.metadata">
<summary lang="en_GB">Watch videos from VRT NU</summary>
<description lang="en_GB">VRT NU is the video-on-demand platform of the Flemish public broadcaster (VRT).

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

[I]The VRT NU add-on is not endorsed by VRT, and is provided 'as is' without any warranty of any kind.[/I]</description>
<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>
<summary lang="nl_NL">VRT NU videos bekijken.</summary>
<description lang="nl_NL">VRT NU is het video-on-demand platform van de Vlaamse publieke omroep (VRT).
<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>
<summary lang="nl_NL">VRT NU videos bekijken.</summary>
<description lang="nl_NL">VRT NU is het video-on-demand platform van de Vlaamse publieke omroep (VRT).

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

[I]Deze VRT NU add-on wordt niet ondersteund door de VRT, en wordt aangeboden 'as is', zonder enige garantie.[/I]</description>
<disclaimer lang="nl_NL">Deze VRT NU add-on wordt niet ondersteund door de VRT, en wordt aangeboden 'as is', zonder enige garantie.</disclaimer>
<language>en nl</language>
<platform>all</platform>
<license>GPL-3.0-only</license>
<forum>https://www.facebook.com/kodivrtnu/</forum>
<website>https://github.com/add-ons/plugin.video.vrt.nu/wiki</website>
<source>https://github.com/add-ons/plugin.video.vrt.nu</source>
<news>
<disclaimer lang="nl_NL">Deze VRT NU add-on wordt niet ondersteund door de VRT, en wordt aangeboden 'as is', zonder enige garantie.</disclaimer>
<language>en nl</language>
<platform>all</platform>
<license>GPL-3.0-only</license>
<forum>https://www.facebook.com/kodivrtnu/</forum>
<website>https://github.com/add-ons/plugin.video.vrt.nu/wiki</website>
<source>https://github.com/add-ons/plugin.video.vrt.nu</source>
<news>
v2.4.0 (2020-07-18)
- Show error messages when connections fail
- Improve user authentication cache
Expand Down Expand Up @@ -80,15 +80,15 @@ v2.3.1 (2020-01-14)
- Small fix for livestreams
- Improvements to metadata handling specific to Kodi rendering
- Support multiple YouTube links per channel
</news>
<assets>
<icon>resources/media/icon.png</icon>
<fanart>resources/media/fanart.png</fanart>
<screenshot>resources/media/screenshot01.jpg</screenshot>
<screenshot>resources/media/screenshot02.jpg</screenshot>
<screenshot>resources/media/screenshot03.jpg</screenshot>
<screenshot>resources/media/screenshot04.jpg</screenshot>
</assets>
<reuselanguageinvoker>true</reuselanguageinvoker>
</extension>
</news>
<assets>
<icon>resources/media/icon.png</icon>
<fanart>resources/media/fanart.png</fanart>
<screenshot>resources/media/screenshot01.jpg</screenshot>
<screenshot>resources/media/screenshot02.jpg</screenshot>
<screenshot>resources/media/screenshot03.jpg</screenshot>
<screenshot>resources/media/screenshot04.jpg</screenshot>
</assets>
<reuselanguageinvoker>true</reuselanguageinvoker>
</extension>
</addon>
1 change: 0 additions & 1 deletion resources/lib/apihelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def list_tvshows(self, category=None, channel=None, feature=None, use_favorites=

def tvshow_to_listitem(self, tvshow, program, cache_file):
"""Return a ListItem based on a Suggests API result"""

label = self._metadata.get_label(tvshow)

if program:
Expand Down
16 changes: 16 additions & 0 deletions tests/test_routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,22 @@ def test_play_upnext_route(self):
addon.run(['plugin://plugin.video.vrt.nu/play/upnext/vid-a39ab219-9598-4a79-b676-98b724cceff1', '0', ''])
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')

def test_play_whatson_id(self):
"""Play video by whatsonid method: /play/whatson/<whatson_id>"""
# Pano S2018E05 is available until 9999-12-31
addon.run(['plugin://plugin.video.vrt.nu/play/whatson/490431755527', '0', ''])
self.assertEqual(plugin.url_for(addon.play_whatson_id, whatson_id='490431755527'), 'plugin://plugin.video.vrt.nu/play/whatson/490431755527')

def test_update_repos(self):
"""Update repositories: /update/repos"""
addon.run(['plugin://plugin.video.vrt.nu/update/repos', '0', ''])
self.assertEqual(plugin.url_for(addon.update_repos), 'plugin://plugin.video.vrt.nu/update/repos')

def test_show_settings_addons(self):
"""Open the Kodi System settings: /show/settings/addons"""
addon.run(['plugin://plugin.video.vrt.nu/show/settings/addons', '0', ''])
self.assertEqual(plugin.url_for(addon.show_settings_addons), 'plugin://plugin.video.vrt.nu/show/settings/addons')


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

0 comments on commit bee5bd9

Please sign in to comment.