Skip to content

Commit

Permalink
2.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariusz89B committed Nov 9, 2021
1 parent c335b86 commit 8e8ea61
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 6 deletions.
7 changes: 4 additions & 3 deletions addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon id="plugin.video.viaplay" version="2.2.2" name="Viaplay" provider-name="emilsvennesson">
<addon id="plugin.video.viaplay" version="2.2.3" name="Viaplay" provider-name="emilsvennesson">
<requires>
<import addon="script.module.requests" version="2.9.1" />
<import addon="script.module.iso8601" version="0.1.11" />
Expand All @@ -16,10 +16,11 @@
<description lang="nb_NO">Se innhold fra Viaplay.</description>
<description lang="sv_SE">Titta på innehåll från Viaplay.</description>
<description lang="pl_PL">Oglądaj treści z Viaplay.</description>
<news>2021.10.24 v2.2.2[CR]+ Fixed plot[CR][CR]2021.10.06 v2.2.1[CR]+ Fixed category sport matches abbreviations[CR][CR]2021.09.29 v2.2.0[CR]+ Fixed subtitles[CR][CR]2021.09.27 v2.1.9[CR]+ Fixed product categories[CR][CR]2021.08.17 v2.1.8[CR]+ Fixed html import error[CR][CR]2021.08.11 v2.1.7[CR]+ Fixed M3U playlist generator[CR][CR]2021.08.09 v2.1.6[CR]+ Added M3U playlist generator[CR][CR]2021.08.08 v2.1.5[CR]+ Added setting "Hide previously aired Live-Tv programmes"[CR][CR]2021.08.07 v2.1.4[CR]+ Added watched and purchased categories for viaplay.pl[CR]+ Fixed category error[CR][CR]2021.08.05 v.2.1.3[CR]+ Added viaplay.pl
<description lang="lt_LT">Žiūrėkite turinį iš Viaplay.</description>
<news>2021.11.09 v2.2.3[CR]+ Added viaplay.lt[CR][CR]2021.10.24 v2.2.2[CR]+ Fixed plot[CR][CR]2021.10.06 v2.2.1[CR]+ Fixed category sport matches abbreviations[CR][CR]2021.09.29 v2.2.0[CR]+ Fixed subtitles[CR][CR]2021.09.27 v2.1.9[CR]+ Fixed product categories[CR][CR]2021.08.17 v2.1.8[CR]+ Fixed html import error[CR][CR]2021.08.11 v2.1.7[CR]+ Fixed M3U playlist generator[CR][CR]2021.08.09 v2.1.6[CR]+ Added M3U playlist generator[CR][CR]2021.08.08 v2.1.5[CR]+ Added setting "Hide previously aired Live-Tv programmes"[CR][CR]2021.08.07 v2.1.4[CR]+ Added watched and purchased categories for viaplay.pl[CR]+ Fixed category error[CR][CR]2021.08.05 v.2.1.3[CR]+ Added viaplay.pl
</news>
<platform>all</platform>
<language>sv dk no fi en pl</language>
<language>sv dk no fi en pl lt</language>
<license>GNU GENERAL PUBLIC LICENSE. Version 3, 29 June 2007</license>
<source>https://github.com/emilsvennesson/kodi-viaplay</source>
<forum>http://forum.kodi.tv/showthread.php?tid=286387</forum>
Expand Down
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
2021.11.09 v.2.2.3
+ Added viaplay.lt @Mariusz89B

2021.10.24 v.2.2.2
+ Fixed plot @mbebe

Expand Down
8 changes: 8 additions & 0 deletions resources/language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -259,4 +259,12 @@ msgstr ""

msgctxt "#30064"
msgid "M3U playlist created"
msgstr ""

msgctxt "#30065"
msgid "viaplay.lt"
msgstr ""

msgctxt "#30066"
msgid "Lithuanian"
msgstr ""
10 changes: 9 additions & 1 deletion resources/language/resource.language.pl_pl/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -259,4 +259,12 @@ msgstr "Tworzenie listy odtwarzania M3U..."

msgctxt "#30064"
msgid "M3U playlist created"
msgstr "Utworzono listę odtwarzania M3U"
msgstr "Utworzono listę odtwarzania M3U"

msgctxt "#30065"
msgid "viaplay.lt"
msgstr ""

msgctxt "#30066"
msgid "Lithuanian"
msgstr "Litewski"
10 changes: 9 additions & 1 deletion resources/language/resource.language.sv_se/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -259,4 +259,12 @@ msgstr "Skapar M3U spellista..."

msgctxt "#30064"
msgid "M3U playlist created"
msgstr "M3U spellista skapad"
msgstr "M3U spellista skapad"

msgctxt "#30065"
msgid "viaplay.lt"
msgstr ""

msgctxt "#30066"
msgid "Lithuanian"
msgstr "Litauiska"
2 changes: 2 additions & 0 deletions resources/lib/kodihelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ def get_country_code(self):
country_code = 'fi'
elif country_id == '4':
country_code = 'pl'
elif country_id == '5':
country_code = 'lt'

return country_code

Expand Down
5 changes: 5 additions & 0 deletions resources/lib/viaplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import requests
import xbmc
import xbmcvfs
import xbmcgui
from xbmcaddon import Addon


Expand Down Expand Up @@ -151,6 +152,9 @@ def make_request(self, url, method, params=None, payload=None, headers=None):
self.log('Response: %s' % req.content)
self.cookie_jar.save(ignore_discard=True, ignore_expires=False)

if b'MissingVideoError' in req.content:
xbmcgui.Dialog().ok('Viaplay', 'Content is missing.')

return self.parse_response(req.content)

def parse_response(self, response):
Expand Down Expand Up @@ -245,6 +249,7 @@ def get_stream(self, guid, pincode=None, tve='false'):
params['isTve'] = tve

data = self.make_request(url=url, method='get', params=params)

if 'viaplay:media' in data['_links']:
mpd_url = data['_links']['viaplay:media']['href']
elif 'viaplay:fallbackMedia' in data['_links']:
Expand Down
2 changes: 1 addition & 1 deletion resources/settings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<settings>
<category label="30003">
<setting id="site" type="enum" label="30007" lvalues="30008|30009|30010|30011|30054" default="0"/>
<setting id="site" type="enum" label="30007" lvalues="30008|30009|30010|30011|30054|30065" default="0"/>
<setting id="subtitles" type="bool" label="30012" default="true"/>
<setting id="first_run" type="bool" default="true" visible="false"/>
<setting type="sep" />
Expand Down

0 comments on commit 8e8ea61

Please sign in to comment.