Skip to content

Commit

Permalink
- Fix Fav team montreal (closes #19)
Browse files Browse the repository at this point in the history
- Fix watch from beginning dialog on archive
  • Loading branch information
eracknaphobia committed Jan 25, 2021
1 parent af31a27 commit 6a3a51a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
7 changes: 3 additions & 4 deletions addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.nhlgcl" name="NHL TV™" version="2021.1.21" provider-name="eracknaphobia">
<addon id="plugin.video.nhlgcl" name="NHL TV™" version="2021.1.25" provider-name="eracknaphobia">
<requires>
<import addon="xbmc.python" version="2.24.0"/>
<import addon="script.module.pytz" />
Expand All @@ -20,9 +20,8 @@
restrictions apply, including national blackouts.
</disclaimer>
<news>
- Update code for python 3 compatibility
- Fix for too many sign-ins error
- Code Cleanup
- Fix Fav team montreal
- Fix watch from beginning dialog on archive
</news>
<language>en</language>
<platform>all</platform>
Expand Down
4 changes: 2 additions & 2 deletions resources/lib/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
ROGERS_SUBSCRIBER = settings.getSetting("rogers")
NO_SPOILERS = settings.getSetting("no_spoilers")
QUALITY = settings.getSetting("stream_quality")
FAV_TEAM = settings.getSetting("fav_team")
FAV_TEAM = settings.getSetting("fav_team").encode('utf8')
TEAM_NAMES = settings.getSetting("team_names")
TIME_FORMAT = settings.getSetting("time_format")
VIEW_MODE = settings.getSetting("view_mode")
Expand Down Expand Up @@ -592,7 +592,7 @@ def natural_sort_key(s):


# Refresh Fav team info if fav team changed
if FAV_TEAM != str(settings.getSetting("fav_team_name")):
if FAV_TEAM != settings.getSetting("fav_team_name").encode('utf8'):
if FAV_TEAM == 'None':
settings.setSetting(id="fav_team_name", value='')
settings.setSetting(id="fav_team_id", value='')
Expand Down
6 changes: 3 additions & 3 deletions resources/lib/nhl_tv.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ def categories():
add_dir(LOCAL_STRING(30360), '/live', 100, ICON, FANART)
add_dir(LOCAL_STRING(30361), '/live', 105, ICON, FANART)
if FAV_TEAM != 'None' and FAV_TEAM != '':
add_fav_today(FAV_TEAM + LOCAL_STRING(30362), FAV_TEAM_LOGO, FANART)
add_dir(FAV_TEAM + LOCAL_STRING(30363), 'favteam', 500, FAV_TEAM_LOGO, FANART)
add_fav_today(FAV_TEAM + LOCAL_STRING(30362).encode('utf8'), FAV_TEAM_LOGO, FANART)
add_dir(FAV_TEAM + LOCAL_STRING(30363).encode('utf8'), 'favteam', 500, FAV_TEAM_LOGO, FANART)
add_dir(LOCAL_STRING(30364), '/date', 200, ICON, FANART)
add_dir(LOCAL_STRING(30365), '/qp', 300, ICON, FANART)

Expand Down Expand Up @@ -241,7 +241,7 @@ def stream_select(game_id, start_time):
sys.exit()
else:
start_from_beginning = -1
if start_time is not None:
if start_time is not None and 'archive' not in media_state[0].lower().strip():
dialog = xbmcgui.Dialog()
start_from_beginning = dialog.select("Choose Start", ['Watch Live', 'Start from Beginning'])

Expand Down

0 comments on commit 6a3a51a

Please sign in to comment.