mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
Replace translatePath in top level files
This commit is contained in:
parent
5e7901be27
commit
e8beee331c
4 changed files with 24 additions and 8 deletions
|
@ -6,12 +6,16 @@ from __future__ import division, absolute_import, print_function, unicode_litera
|
||||||
import os
|
import os
|
||||||
import sys
|
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')
|
__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__)
|
sys.path.insert(0, __base__)
|
||||||
|
|
||||||
|
|
|
@ -6,12 +6,16 @@ from __future__ import division, absolute_import, print_function, unicode_litera
|
||||||
import os
|
import os
|
||||||
import sys
|
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')
|
__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__)
|
sys.path.insert(0, __base__)
|
||||||
|
|
||||||
|
|
|
@ -6,12 +6,16 @@ from __future__ import division, absolute_import, print_function, unicode_litera
|
||||||
import os
|
import os
|
||||||
import sys
|
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')
|
__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__)
|
sys.path.insert(0, __base__)
|
||||||
|
|
||||||
|
|
|
@ -7,12 +7,16 @@ import os
|
||||||
import threading
|
import threading
|
||||||
import sys
|
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')
|
__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__)
|
sys.path.insert(0, __base__)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue