mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
Plug in dynamic packages
For now, Kodi will need to be restarted to load from the dynamic package every time there is an update to the package.
This commit is contained in:
parent
a18fa90f13
commit
aac8229f9b
6 changed files with 17 additions and 16 deletions
|
@ -11,6 +11,8 @@ import xbmcaddon
|
|||
|
||||
#################################################################################################
|
||||
|
||||
cache = xbmc.translatePath('special://temp/emby').decode('utf-8')
|
||||
sys.path.insert(0, cache)
|
||||
__addon__ = xbmcaddon.Addon(id='plugin.video.emby').getAddonInfo('path').decode('utf-8')
|
||||
__base__ = xbmc.translatePath(os.path.join(__addon__, 'resources', 'lib')).decode('utf-8')
|
||||
sys.path.append(__base__)
|
||||
|
|
|
@ -11,6 +11,8 @@ import xbmcaddon
|
|||
|
||||
#################################################################################################
|
||||
|
||||
cache = xbmc.translatePath('special://temp/emby').decode('utf-8')
|
||||
sys.path.insert(0, cache)
|
||||
__addon__ = xbmcaddon.Addon(id='plugin.video.emby').getAddonInfo('path').decode('utf-8')
|
||||
__base__ = xbmc.translatePath(os.path.join(__addon__, 'resources', 'lib')).decode('utf-8')
|
||||
sys.path.append(__base__)
|
||||
|
|
|
@ -11,6 +11,8 @@ import xbmcaddon
|
|||
|
||||
#################################################################################################
|
||||
|
||||
cache = xbmc.translatePath('special://temp/emby').decode('utf-8')
|
||||
sys.path.insert(0, cache)
|
||||
__addon__ = xbmcaddon.Addon(id='plugin.video.emby').getAddonInfo('path').decode('utf-8')
|
||||
__base__ = xbmc.translatePath(os.path.join(__addon__, 'resources', 'lib')).decode('utf-8')
|
||||
sys.path.append(__base__)
|
||||
|
|
|
@ -3,12 +3,10 @@
|
|||
#################################################################################################
|
||||
|
||||
import logging
|
||||
import sys
|
||||
|
||||
import xbmc
|
||||
import xbmcvfs
|
||||
|
||||
import objects
|
||||
from helper import loghandler
|
||||
from emby import Emby
|
||||
|
||||
|
@ -20,19 +18,6 @@ LOG = logging.getLogger('EMBY.entrypoint')
|
|||
|
||||
#################################################################################################
|
||||
|
||||
try:
|
||||
temp = xbmc.translatePath('special://temp/emby').decode('utf-8')
|
||||
|
||||
if not xbmcvfs.exists(temp):
|
||||
xbmcvfs.mkdir(temp)
|
||||
|
||||
sys.path.insert(0, temp)
|
||||
reload(objects)
|
||||
except Exception as error:
|
||||
|
||||
LOG.error(error)
|
||||
LOG.warn('No objects not found, using default.')
|
||||
|
||||
from default import Events
|
||||
from service import Service
|
||||
from context import Context
|
||||
|
|
|
@ -131,7 +131,7 @@ class Service(xbmc.Monitor):
|
|||
''' Check for objects build version and compare.
|
||||
This pulls a dict that contains all the information for the build needed.
|
||||
'''
|
||||
LOG.info("--[ check updates ]")
|
||||
LOG.info("--[ check updates/%s ]", objects.version)
|
||||
kodi = xbmc.getInfoLabel('System.BuildVersion')
|
||||
url = "https://sheets.googleapis.com/v4/spreadsheets/1cKWQCVL0lVONulO2KyGzBilzhGvsyuSjFvrqe8g6nJw/values/A2:B?key=AIzaSyAP-1mcBglk9zIofJlqGpvKXkff3GRMhdI"
|
||||
|
||||
|
@ -152,6 +152,9 @@ class Service(xbmc.Monitor):
|
|||
get_objects(zipfile, label + '.zip')
|
||||
except Exception as error:
|
||||
LOG.info(error)
|
||||
|
||||
dialog("ok", heading="{emby}", line1=_(33135))
|
||||
xbmc.executebuiltin('RestartApp')
|
||||
|
||||
def onNotification(self, sender, method, data):
|
||||
|
||||
|
|
|
@ -7,10 +7,17 @@ import os
|
|||
import sys
|
||||
|
||||
import xbmc
|
||||
import xbmcvfs
|
||||
import xbmcaddon
|
||||
|
||||
#################################################################################################
|
||||
|
||||
cache = xbmc.translatePath('special://temp/emby').decode('utf-8')
|
||||
|
||||
if not xbmcvfs.exists(cache):
|
||||
xbmcvfs.mkdir(cache)
|
||||
|
||||
sys.path.insert(0, cache)
|
||||
__addon__ = xbmcaddon.Addon(id='plugin.video.emby').getAddonInfo('path').decode('utf-8')
|
||||
__base__ = xbmc.translatePath(os.path.join(__addon__, 'resources', 'lib')).decode('utf-8')
|
||||
sys.path.append(__base__)
|
||||
|
|
Loading…
Reference in a new issue