Skip to content

Commit

Permalink
fixed session auth SID being bytes instead of str
Browse files Browse the repository at this point in the history
  • Loading branch information
WanWizard committed Sep 17, 2023
1 parent 3f576fd commit 5a00fad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion plugin/controllers/ajax.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions plugin/controllers/models/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 = ''

Expand Down Expand Up @@ -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 = ''

Expand Down
4 changes: 2 additions & 2 deletions plugin/controllers/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5a00fad

Please sign in to comment.