From ee162c84454dcfb959fc6a8020e1b6a0a76d0900 Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Mon, 6 May 2019 15:56:45 +0200 Subject: [PATCH] Reorganize settings This PR implements: - **Credentials** - Username - Password - **Video** - Show subtitles - Use DRM - **Interface** - Permalink in plot - **Debug** - Inputstream Adaptive settings - Clear VRT cookies - Log level --- README.md | 10 ++-- addon.py | 5 ++ .../resource.language.en_gb/strings.po | 48 ++++++++++------ .../resource.language.nl_nl/strings.po | 56 +++++++++++++------ resources/lib/vrtplayer/actions.py | 2 +- resources/settings.xml | 29 ++++------ 6 files changed, 90 insertions(+), 60 deletions(-) diff --git a/README.md b/README.md index 0d243668..3b712379 100644 --- a/README.md +++ b/README.md @@ -101,15 +101,15 @@ you can send a message to [our Facebook page](https://facebook.com/kodivrtnu/). - Roaming support added (@mediaminister) #### v1.5.0 (2018-12-27) - - 720p Livestreams when enabling in settings + having kodi 18 + having widevine.dll present (@mediaminister) - - Fixed bug where watched icon was not showing in Kodi 18 - - Implemented different way of working with subtitles (@mediaminister) +- 720p Livestreams when enabling in settings + having kodi 18 + having widevine.dll present (@mediaminister) +- Fixed bug where watched icon was not showing in Kodi 18 +- Implemented different way of working with subtitles (@mediaminister) #### v1.4.3 (2018-11-07) - - Livestreams working again +- Livestreams working again #### v1.4.2 (2018-10-11) - - Changed way of working with urls when a season is refering to href="#" +- Changed way of working with urls when a season is refering to href="#" #### v1.4.1 (2018-09-24) - Adapted plugin to new vrtnu layout for showing multiple seasons diff --git a/addon.py b/addon.py index e5195380..c96ba54e 100644 --- a/addon.py +++ b/addon.py @@ -28,6 +28,11 @@ def router(params_string): kodi_wrapper = kodiwrapper.KodiWrapper(_ADDON_HANDLE, _ADDON_URL, addon) + if action == actions.CLEAR_COOKIES: + from resources.lib.vrtplayer import tokenresolver + token_resolver = tokenresolver.TokenResolver(kodi_wrapper) + token_resolver.reset_cookies() + return if action == actions.LISTING_TVGUIDE: from resources.lib.vrtplayer import tvguide tv_guide = tvguide.TVGuide(kodi_wrapper) diff --git a/resources/language/resource.language.en_gb/strings.po b/resources/language/resource.language.en_gb/strings.po index 04d712c3..46a82881 100644 --- a/resources/language/resource.language.en_gb/strings.po +++ b/resources/language/resource.language.en_gb/strings.po @@ -27,38 +27,50 @@ msgctxt "#30002" msgid "Password" msgstr "Password" -msgctxt "#30003" -msgid "Delete cookies" -msgstr "Delete cookies" - msgctxt "#30010" -msgid "Subtitles" -msgstr "Subtitles" +msgid "Video" +msgstr "Video" msgctxt "#30011" msgid "Show subtitles when available" msgstr "Show subtitles when available" -msgctxt "#30020" -msgid "DRM" -msgstr "DRM" - -msgctxt "#30021" +msgctxt "#30012" msgid "Use DRM for 720p HD-quality livestreams" msgstr "Use DRM for 720p HD-quality livestreams" -msgctxt "#30022" +msgctxt "#30013" msgid "Maximum bandwidth (bits/sec)" msgstr "Maximum bandwidth (bits/sec)" -msgctxt "#30030" -msgid "Advanced" -msgstr "Advanced" +msgctxt "#30020" +msgid "Interface" +msgstr "Interface" -msgctxt "#30031" +msgctxt "#30021" msgid "Show episode permalink in plot" msgstr "Show episode permalink in plot" +msgctxt "#30040" +msgid "Debug" +msgstr "Debug" + +msgctxt "#30041" +msgid "InputStream Adaptive settings" +msgstr "InputStream Adaptive settings" + +msgctxt "#30042" +msgid "Install Widevine (for DRM content)" +msgstr "Install Widevine (for DRM content)" + +msgctxt "#30048" +msgid "Clear VRT cookies" +msgstr "Clear VRT cookies" + +msgctxt "#30049" +msgid "Log level" +msgstr "Log level" + msgctxt "#30051" msgid "Login failed!" msgstr "Login failed!" @@ -72,8 +84,8 @@ msgid "This program cannot be played. To view this program outside of Belgium, y msgstr "This program cannot be played. To view this program outside of Belgium, you first have to validate a Belgian mobile phone number on the VRT NU website." msgctxt "#30054" -msgid "Woops something went wrong, check the log for more details" -msgstr "Woops something went wrong, check the log for more details" +msgid "Whoops something went wrong, check the kodi log for more details." +msgstr "Whoops something went wrong, check the kodi log for more details." msgctxt "#30055" msgid "Please fill in your email address to login." diff --git a/resources/language/resource.language.nl_nl/strings.po b/resources/language/resource.language.nl_nl/strings.po index 87f8b3f5..20b5f6cd 100644 --- a/resources/language/resource.language.nl_nl/strings.po +++ b/resources/language/resource.language.nl_nl/strings.po @@ -28,38 +28,58 @@ msgctxt "#30002" msgid "Password" msgstr "Wachtwoord" -msgctxt "#30003" -msgid "Delete cookies" -msgstr "Verwijder cookies" - msgctxt "#30010" -msgid "Subtitles" -msgstr "Ondertiteling" +msgid "Video" +msgstr "Video" msgctxt "#30011" msgid "Show subtitles when available" msgstr "Toon ondertiteling indien beschikbaar" -msgctxt "#30020" -msgid "DRM" -msgstr "DRM" - -msgctxt "#30021" +msgctxt "#30012" msgid "Use DRM for 720p HD-quality livestreams" msgstr "Gebruik DRM voor de livestreams in 720p HD-kwaliteit" -msgctxt "#30022" +msgctxt "#30013" msgid "Maximum bandwidth (bits/sec)" msgstr "Maximale bandbreedte (bits/sec)" -msgctxt "#30030" -msgid "Advanced" -msgstr "Geavanceerd" +msgctxt "#30020" +msgid "Interface" +msgstr "Interface" -msgctxt "#30031" +msgctxt "#30021" msgid "Show episode permalink in plot" msgstr "Toon aflevering permalink in beschrijving" +msgctxt "#30030" +msgid "VRT Radio" +msgstr "VRT Radio" + +msgctxt "#30031" +msgid "Use VRT Radio addon (plugin.audio.vrt.radio)" +msgstr "Gebruik VRT Radio addon (plugin.audio.vrt.radio)" + +msgctxt "#30040" +msgid "Debug" +msgstr "Debug" + +msgctxt "#30041" +msgid "InputStream Adaptive settings" +msgstr "InputStream Adaptive instellingen" + +msgctxt "#30042" +msgid "Install Widevine (for DRM content)" +msgstr "Installeer Widevine (voor DRM content)" + +msgctxt "#30048" +msgid "Clear VRT cookies" +msgstr "Verwijder VRT cookies" + +msgctxt "#30049" +msgid "Log level" +msgstr "Log level" + msgctxt "#30051" msgid "Login failed!" msgstr "Inloggen mislukt!" @@ -73,8 +93,8 @@ msgid "This program cannot be played. To view this program outside of Belgium, y msgstr "Het programma kan niet afgespeeld worden. Om dit programma buiten Belgiƫ te bekijken moet je eerst een Belgisch gsm-nummer valideren via de VRT NU-website." msgctxt "#30054" -msgid "Woops something went wrong, check the log for more details" -msgstr "Oeps, er ging iets mis, check de log voor meer informatie" +msgid "Whoops something went wrong, check the kodi log for more details." +msgstr "Oeps, er ging iets mis, check de kodi log voor meer informatie." msgctxt "#30055" msgid "Please fill in your email address to login." diff --git a/resources/lib/vrtplayer/actions.py b/resources/lib/vrtplayer/actions.py index 132228d8..9b0fe06d 100644 --- a/resources/lib/vrtplayer/actions.py +++ b/resources/lib/vrtplayer/actions.py @@ -5,6 +5,7 @@ from __future__ import absolute_import, division, unicode_literals +CLEAR_COOKIES = 'clearcookies' LISTING_AZ_TVSHOWS = 'listingaztvshows' LISTING_CATEGORIES = 'listingcategories' LISTING_CATEGORY_TVSHOWS = 'listingcategorytvshows' @@ -13,5 +14,4 @@ LISTING_LIVE = 'listinglive' LISTING_RECENT = 'listingrecent' LISTING_TVGUIDE = 'listingtvguide' - PLAY = 'play' diff --git a/resources/settings.xml b/resources/settings.xml index 2b8e6b8c..52ba7888 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -1,28 +1,21 @@ - + - + + + - - - - 1 - 0 - - 0 - 512 - 102400 - - - 14048 - - + + - - + + + + +