Replace translatePath in top level files

This commit is contained in:
Matt 2021-10-02 14:23:28 -04:00
parent 5e7901be27
commit e8beee331c
4 changed files with 24 additions and 8 deletions

View file

@ -6,12 +6,16 @@ from __future__ import division, absolute_import, print_function, unicode_litera
import os
import sys
from kodi_six import xbmc, xbmcaddon
from kodi_six import xbmc, xbmcaddon, xbmcvfs
#################################################################################################
kodi_version = int(xbmc.getInfoLabel('System.BuildVersion')[:2])
__addon__ = xbmcaddon.Addon(id='plugin.video.jellyfin')
__base__ = xbmc.translatePath(os.path.join(__addon__.getAddonInfo('path'), 'jellyfin_kodi'))
if kodi_version > 18:
__base__ = xbmcvfs.translatePath(os.path.join(__addon__.getAddonInfo('path'), 'jellyfin_kodi'))
else:
__base__ = xbmc.translatePath(os.path.join(__addon__.getAddonInfo('path'), 'jellyfin_kodi'))
sys.path.insert(0, __base__)

View file

@ -6,12 +6,16 @@ from __future__ import division, absolute_import, print_function, unicode_litera
import os
import sys
from kodi_six import xbmc, xbmcaddon
from kodi_six import xbmc, xbmcaddon, xbmcvfs
#################################################################################################
kodi_version = int(xbmc.getInfoLabel('System.BuildVersion')[:2])
__addon__ = xbmcaddon.Addon(id='plugin.video.jellyfin')
__base__ = xbmc.translatePath(os.path.join(__addon__.getAddonInfo('path'), 'jellyfin_kodi'))
if kodi_version > 18:
__base__ = xbmcvfs.translatePath(os.path.join(__addon__.getAddonInfo('path'), 'jellyfin_kodi'))
else:
__base__ = xbmc.translatePath(os.path.join(__addon__.getAddonInfo('path'), 'jellyfin_kodi'))
sys.path.insert(0, __base__)

View file

@ -6,12 +6,16 @@ from __future__ import division, absolute_import, print_function, unicode_litera
import os
import sys
from kodi_six import xbmc, xbmcaddon
from kodi_six import xbmc, xbmcaddon, xbmcvfs
#################################################################################################
kodi_version = int(xbmc.getInfoLabel('System.BuildVersion')[:2])
__addon__ = xbmcaddon.Addon(id='plugin.video.jellyfin')
__base__ = xbmc.translatePath(os.path.join(__addon__.getAddonInfo('path'), 'jellyfin_kodi'))
if kodi_version > 18:
__base__ = xbmcvfs.translatePath(os.path.join(__addon__.getAddonInfo('path'), 'jellyfin_kodi'))
else:
__base__ = xbmc.translatePath(os.path.join(__addon__.getAddonInfo('path'), 'jellyfin_kodi'))
sys.path.insert(0, __base__)

View file

@ -7,12 +7,16 @@ import os
import threading
import sys
from kodi_six import xbmc, xbmcaddon
from kodi_six import xbmc, xbmcaddon, xbmcvfs
#################################################################################################
kodi_version = int(xbmc.getInfoLabel('System.BuildVersion')[:2])
__addon__ = xbmcaddon.Addon(id='plugin.video.jellyfin')
__base__ = xbmc.translatePath(os.path.join(__addon__.getAddonInfo('path'), 'jellyfin_kodi'))
if kodi_version > 18:
__base__ = xbmcvfs.translatePath(os.path.join(__addon__.getAddonInfo('path'), 'jellyfin_kodi'))
else:
__base__ = xbmc.translatePath(os.path.join(__addon__.getAddonInfo('path'), 'jellyfin_kodi'))
sys.path.insert(0, __base__)