Initial work on Kodi 19 (and Python 3) support

This commit is contained in:
Odd Stråbø 2020-01-04 03:32:30 +01:00
commit a51bf9c2cc
68 changed files with 403 additions and 339 deletions

View file

@ -1,14 +1,16 @@
# -*- coding: utf-8 -*-
from __future__ import division, absolute_import, print_function, unicode_literals
##################################################################################################
import logging
import sqlite3
import urllib
from ntpath import dirname
from obj import Objects
from kodi import TVShows as KodiDb, queries as QU
from six.moves.urllib.parse import urlencode
from .obj import Objects
from .kodi import TVShows as KodiDb, queries as QU
import downloader as server
from database import jellyfin_db, queries as QUEM
from helper import api, stop, validate, jellyfin_item, library_check, settings, values, Local
@ -392,12 +394,12 @@ class TVShows(KodiDb):
else:
obj['Path'] = "plugin://plugin.video.jellyfin/%s/" % obj['SeriesId']
params = {
'filename': obj['Filename'].encode('utf-8'),
'filename': obj['Filename'],
'id': obj['Id'],
'dbid': obj['EpisodeId'],
'mode': "play"
}
obj['Filename'] = "%s?%s" % (obj['Path'], urllib.urlencode(params))
obj['Filename'] = "%s?%s" % (obj['Path'], urlencode(params))
def get_show_id(self, obj):
obj['ShowId'] = self.jellyfin_db.get_item_by_id(*values(obj, QUEM.get_item_series_obj))