Skip to content

Commit

Permalink
v2.4.6_v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariusz89B committed Apr 17, 2023
1 parent 357d694 commit 99e1961
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion 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.6-beta.1" name="Viaplay" provider-name="mariusz89b, emilsvennesson, heppen-dev">
<addon id="plugin.video.viaplay" version="2.4.6-beta.2" 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 Down
9 changes: 6 additions & 3 deletions resources/lib/addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,17 +593,20 @@ def channels():

for index, program in enumerate(channel['_embedded']['viaplay:products']): # get current live program
if index > 0:
if helper.vp.get_event_status(program) == 'live':
if helper.vp.get_event_status(program) in ['live', 'archive', 'upcoming']:
if program.get('content'):
current_program_title = coloring(program['content']['title'], 'live')
else: # no broadcast
current_program_title = coloring(helper.language(30049), 'no_broadcast')
break

regex = fr'\(SimplyTV\)\s*|\b{helper.get_country_code().upper()}\b\s*'
title = re.sub(regex, '', channel['content']['title'])

if sys.version_info[0] > 2:
list_title = '[B]{0}[/B]: {1}'.format(channel['content']['title'], current_program_title)
list_title = '[B]{0}[/B]: {1}'.format(title, current_program_title)
else:
list_title = '[B]{0}[/B]: {1}'.format(channel['content']['title'], current_program_title.encode('utf-8'))
list_title = '[B]{0}[/B]: {1}'.format(title, current_program_title.encode('utf-8'))

helper.add_item(list_title, plugin_url, art=art)

Expand Down

0 comments on commit 99e1961

Please sign in to comment.