Fixes for Kodi 18.5 (and Python2)

This commit is contained in:
Odd Stråbø 2020-01-04 05:17:51 +01:00
commit 933a31ac23
6 changed files with 13 additions and 9 deletions

View file

@ -5,6 +5,7 @@ from __future__ import division, absolute_import, print_function, unicode_litera
import logging
from six.moves.urllib.parse import urlencode
from kodi_six.utils import py2_encode
import downloader as server
from .obj import Objects
@ -178,7 +179,7 @@ class Movies(KodiDb):
else:
obj['Path'] = "plugin://plugin.video.jellyfin/%s/" % obj['LibraryId']
params = {
'filename': obj['Filename'],
'filename': py2_encode(obj['Filename'], 'utf-8'),
'id': obj['Id'],
'dbid': obj['MovieId'],
'mode': "play"

View file

@ -7,6 +7,7 @@ import datetime
import logging
import re
from six.moves.urllib.parse import urlencode
from kodi_six.utils import py2_encode
from .obj import Objects
from .kodi import MusicVideos as KodiDb, queries as QU
@ -166,7 +167,7 @@ class MusicVideos(KodiDb):
else:
obj['Path'] = "plugin://plugin.video.jellyfin/%s/" % obj['LibraryId']
params = {
'filename': obj['Filename'],
'filename': py2_encode(obj['Filename'], 'utf-8'),
'id': obj['Id'],
'dbid': obj['MvideoId'],
'mode': "play"

View file

@ -8,6 +8,7 @@ import sqlite3
from ntpath import dirname
from six.moves.urllib.parse import urlencode
from kodi_six.utils import py2_encode
from .obj import Objects
from .kodi import TVShows as KodiDb, queries as QU
@ -394,7 +395,7 @@ class TVShows(KodiDb):
else:
obj['Path'] = "plugin://plugin.video.jellyfin/%s/" % obj['SeriesId']
params = {
'filename': obj['Filename'],
'filename': py2_encode(obj['Filename'], 'utf-8'),
'id': obj['Id'],
'dbid': obj['EpisodeId'],
'mode': "play"