Skip to content

Commit

Permalink
v2.4.5_v1
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariusz89B committed Apr 17, 2023
1 parent 42f4376 commit 09837a9
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 16 deletions.
7 changes: 5 additions & 2 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.4.4" name="Viaplay" provider-name="mariusz89b, emilsvennesson, heppen-dev">
<addon id="plugin.video.viaplay" version="2.4.5-beta.1" name="Viaplay" provider-name="mariusz89b, emilsvennesson, heppen-dev">
<requires>
<import addon="script.module.requests" version="2.9.1" />
<import addon="script.module.iso8601" version="0.1.11" />
Expand All @@ -24,7 +24,10 @@
<platform>all</platform>
<license>GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 and MIT LICENSE.</license>
<source>https://github.com/Mariusz89B/plugin.video.viaplay</source>
<news>v2.4.4 (2023-03-12)
<news>v2.4.5 (2023-04-17)
- Bug fixes.

v2.4.4 (2023-03-12)
- Fixed bug when returning from search.
- Added option to enable/disable synchronization.

Expand Down
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v2.4.5 (2023-04-17)
- Bug fixes.

v2.4.4 (2023-03-12)
- Fixed bug when returning from search.
- Added option to enable/disable synchronization.
Expand Down
20 changes: 10 additions & 10 deletions resources/lib/addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,17 +367,17 @@ def root():
}

profiles_dict = helper.vp.get_profiles()
if profiles_dict:
for profile in profiles_dict:
if helper.vp.get_setting('profileid'):
id = helper.vp.get_setting('profileid')
else:
id = helper.vp.get_user_id()['id']

for profile in profiles_dict:
if helper.vp.get_setting('profileid'):
id = helper.vp.get_setting('profileid')
else:
id = helper.vp.get_user_id()['id']

if id == profile['data'].get('id'):
name = '{0} {1}'.format(helper.language(30090), profile['data'].get('name'))
avatar = {'thumb': profile['embedded']['avatar']['data'].get('url')}
helper.add_item(name, plugin.url_for(profiles), art=avatar)
if id == profile['data'].get('id'):
name = '{0} {1}'.format(helper.language(30090), profile['data'].get('name'))
avatar = {'thumb': profile['embedded']['avatar']['data'].get('url')}
helper.add_item(name, plugin.url_for(profiles), art=avatar)

sorted_json = sorted(pages, key=lambda x: x['name'] == 'viaplay:logout')

Expand Down
6 changes: 4 additions & 2 deletions resources/lib/kodihelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ def get_country_code(self):

def get_tld(self):
country_code = self.get_country_code()
if country_code == "nl":
return "com"
if country_code == 'nl':
return 'com'
elif country_code == 'gb':
return 'com'
return country_code

def dialog(self, dialog_type, heading, message=None, options=None, nolabel=None, yeslabel=None, useDetails=False):
Expand Down
5 changes: 3 additions & 2 deletions resources/lib/viaplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,9 @@ def get_profiles(self):

profiles = None

if data['embedded'].get('profiles'):
profiles = data['embedded']['profiles']
if data:
if data['embedded'].get('profiles'):
profiles = data['embedded']['profiles']

return profiles

Expand Down

0 comments on commit 09837a9

Please sign in to comment.