mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-22 21:09:41 +00:00
Remove path injection
This commit is contained in:
parent
256c401ef9
commit
086a704f24
1
.gitignore
vendored
1
.gitignore
vendored
@ -50,6 +50,7 @@ coverage.xml
|
||||
*.py,cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
.mypy_cache/
|
||||
flake8.output
|
||||
test.xml
|
||||
|
||||
|
18
context.py
18
context.py
@ -3,24 +3,6 @@ from __future__ import division, absolute_import, print_function, unicode_litera
|
||||
|
||||
#################################################################################################
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
from kodi_six import xbmc, xbmcaddon, xbmcvfs
|
||||
|
||||
#################################################################################################
|
||||
|
||||
kodi_version = int(xbmc.getInfoLabel('System.BuildVersion')[:2])
|
||||
__addon__ = xbmcaddon.Addon(id='plugin.video.jellyfin')
|
||||
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__)
|
||||
|
||||
#################################################################################################
|
||||
|
||||
from entrypoint import Context # noqa: E402
|
||||
from helper import LazyLogger # noqa: E402
|
||||
|
||||
|
@ -3,24 +3,6 @@ from __future__ import division, absolute_import, print_function, unicode_litera
|
||||
|
||||
#################################################################################################
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
from kodi_six import xbmc, xbmcaddon, xbmcvfs
|
||||
|
||||
#################################################################################################
|
||||
|
||||
kodi_version = int(xbmc.getInfoLabel('System.BuildVersion')[:2])
|
||||
__addon__ = xbmcaddon.Addon(id='plugin.video.jellyfin')
|
||||
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__)
|
||||
|
||||
#################################################################################################
|
||||
|
||||
from entrypoint import Context # noqa: E402
|
||||
from helper import LazyLogger # noqa: E402
|
||||
|
||||
|
18
default.py
18
default.py
@ -3,24 +3,6 @@ from __future__ import division, absolute_import, print_function, unicode_litera
|
||||
|
||||
#################################################################################################
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
from kodi_six import xbmc, xbmcaddon, xbmcvfs
|
||||
|
||||
#################################################################################################
|
||||
|
||||
kodi_version = int(xbmc.getInfoLabel('System.BuildVersion')[:2])
|
||||
__addon__ = xbmcaddon.Addon(id='plugin.video.jellyfin')
|
||||
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__)
|
||||
|
||||
#################################################################################################
|
||||
|
||||
from entrypoint import Events # noqa: E402
|
||||
from helper import LazyLogger # noqa: E402
|
||||
|
||||
|
17
service.py
17
service.py
@ -3,24 +3,9 @@ from __future__ import division, absolute_import, print_function, unicode_litera
|
||||
|
||||
#################################################################################################
|
||||
|
||||
import os
|
||||
import threading
|
||||
import sys
|
||||
|
||||
from kodi_six import xbmc, xbmcaddon, xbmcvfs
|
||||
|
||||
#################################################################################################
|
||||
|
||||
kodi_version = int(xbmc.getInfoLabel('System.BuildVersion')[:2])
|
||||
__addon__ = xbmcaddon.Addon(id='plugin.video.jellyfin')
|
||||
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__)
|
||||
|
||||
#################################################################################################
|
||||
from kodi_six import xbmc
|
||||
|
||||
from entrypoint import Service # noqa: E402
|
||||
from helper.utils import settings # noqa: E402
|
||||
|
@ -1,10 +1,6 @@
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
|
||||
sys.path.insert(0, 'jellyfin_kodi')
|
||||
|
||||
from jellyfin.utils import clean_none_dict_values # noqa: E402
|
||||
from jellyfin_kodi.jellyfin.utils import clean_none_dict_values
|
||||
|
||||
|
||||
@pytest.mark.parametrize("obj,expected", [
|
||||
|
@ -1,13 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import division, absolute_import, print_function, unicode_literals
|
||||
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
|
||||
sys.path.insert(0, 'jellyfin_kodi')
|
||||
|
||||
from helper.utils import values # noqa: E402
|
||||
from jellyfin_kodi.helper.utils import values
|
||||
|
||||
item1 = {'foo': 123, 'bar': 456, 'baz': 789}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user