Skip to content

Commit

Permalink
Fixed Kodi Python3 encoding bug
Browse files Browse the repository at this point in the history
closes #9
  • Loading branch information
back-to committed Feb 12, 2020
1 parent 790ebd8 commit be57837
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions liveproxy/constants.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

from streamlink.compat import is_win32
from streamlink.compat import is_py2, is_win32

if is_win32:
APPDATA = os.environ['APPDATA']
Expand All @@ -20,12 +20,20 @@
try:
# Kodi - service.liveproxy
import xbmc
CONFIG_FILES.extend([xbmc.translatePath('special://profile/addon_data/service.liveproxy/config').encode('utf-8')])
PLUGINS_DIR.extend([
xbmc.translatePath('special://profile/addon_data/service.liveproxy/plugins/').encode('utf-8'),
xbmc.translatePath('special://home/addons/script.module.back-to-plugins/lib/data/').encode('utf-8'),
xbmc.translatePath('special://home/addons/script.module.streamlink-plugins/lib/data/').encode('utf-8'),
])
if is_py2:
CONFIG_FILES.extend([xbmc.translatePath('special://profile/addon_data/service.liveproxy/config').encode('utf-8')])
PLUGINS_DIR.extend([
xbmc.translatePath('special://profile/addon_data/service.liveproxy/plugins/').encode('utf-8'),
xbmc.translatePath('special://home/addons/script.module.back-to-plugins/lib/data/').encode('utf-8'),
xbmc.translatePath('special://home/addons/script.module.streamlink-plugins/lib/data/').encode('utf-8'),
])
else:
CONFIG_FILES.extend([xbmc.translatePath('special://profile/addon_data/service.liveproxy/config')])
PLUGINS_DIR.extend([
xbmc.translatePath('special://profile/addon_data/service.liveproxy/plugins/'),
xbmc.translatePath('special://home/addons/script.module.back-to-plugins/lib/data/'),
xbmc.translatePath('special://home/addons/script.module.streamlink-plugins/lib/data/'),
])
except ImportError:
pass

Expand Down

0 comments on commit be57837

Please sign in to comment.