From 5a00fad652d6931bc43b51070599045e6c743842 Mon Sep 17 00:00:00 2001 From: WanWizard Date: Sun, 17 Sep 2023 17:33:36 +0100 Subject: [PATCH] fixed session auth SID being bytes instead of str --- plugin/controllers/ajax.py | 3 ++- plugin/controllers/models/stream.py | 5 +++-- plugin/controllers/web.py | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/plugin/controllers/ajax.py b/plugin/controllers/ajax.py index ab04c748a..ee42a409c 100644 --- a/plugin/controllers/ajax.py +++ b/plugin/controllers/ajax.py @@ -23,6 +23,7 @@ from Tools.Directories import fileExists from Components.config import config from time import mktime, localtime +from six import ensure_str import os from Plugins.Extensions.OpenWebif.controllers.models.services import getBouquets, getChannels, getAllServices, getSatellites, getProviders, getEventDesc, getSimilarEpg, getChannelEpg, getSearchEpg, getCurrentFullInfo, getMultiEpg, getEvent @@ -369,7 +370,7 @@ def P_webtv(self, request): if session.GetAuth(request) is not None: auth = ':'.join(session.GetAuth(request)) + "@" else: - auth = '-sid:' + str(session.GetSID(request)) + "@" + auth = '-sid:' + ensure_str(session.GetSID(request)) + "@" else: auth = '' vxgenabled = False diff --git a/plugin/controllers/models/stream.py b/plugin/controllers/models/stream.py index 2a49e5b6f..b3e006321 100644 --- a/plugin/controllers/models/stream.py +++ b/plugin/controllers/models/stream.py @@ -11,6 +11,7 @@ from enigma import eServiceReference, getBestPlayableServiceReference from ServiceReference import ServiceReference from six.moves.urllib.parse import unquote, quote +from six import ensure_str import os import re from Components.config import config @@ -120,7 +121,7 @@ def getStream(session, request, m3ufile): if asession.GetAuth(request) is not None: auth = ':'.join(asession.GetAuth(request)) + "@" else: - auth = '-sid:' + str(asession.GetSID(request)) + "@" + auth = '-sid:' + ensure_str(asession.GetSID(request)) + "@" else: auth = '' @@ -240,7 +241,7 @@ def getTS(self, request): if asession.GetAuth(request) is not None: auth = ':'.join(asession.GetAuth(request)) + "@" else: - auth = '-sid:' + str(asession.GetSID(request)) + "@" + auth = '-sid:' + ensure_str(asession.GetSID(request)) + "@" else: auth = '' diff --git a/plugin/controllers/web.py b/plugin/controllers/web.py index ce7eaaa08..c9cff4926 100644 --- a/plugin/controllers/web.py +++ b/plugin/controllers/web.py @@ -549,7 +549,7 @@ def P_servicesxspf(self, request): if session.GetAuth(request) is not None: auth = ':'.join(session.GetAuth(request)) + "@" else: - auth = '-sid:' + str(session.GetSID(request)) + "@" + auth = '-sid:' + ensure_str(session.GetSID(request)) + "@" else: auth = '' portNumber = comp_config.OpenWebif.streamport.value @@ -588,7 +588,7 @@ def P_servicesm3u(self, request): if session.GetAuth(request) is not None: auth = ':'.join(session.GetAuth(request)) + "@" else: - auth = '-sid:' + str(session.GetSID(request)) + "@" + auth = '-sid:' + ensure_str(session.GetSID(request)) + "@" else: auth = '' portNumber = comp_config.OpenWebif.streamport.value