mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
Remove path injection
This commit is contained in:
parent
256c401ef9
commit
086a704f24
8 changed files with 4 additions and 81 deletions
1
.env
1
.env
|
@ -1 +0,0 @@
|
||||||
PYTHONPATH=jellyfin_kodi
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -50,6 +50,7 @@ coverage.xml
|
||||||
*.py,cover
|
*.py,cover
|
||||||
.hypothesis/
|
.hypothesis/
|
||||||
.pytest_cache/
|
.pytest_cache/
|
||||||
|
.mypy_cache/
|
||||||
flake8.output
|
flake8.output
|
||||||
test.xml
|
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 entrypoint import Context # noqa: E402
|
||||||
from helper import LazyLogger # 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 entrypoint import Context # noqa: E402
|
||||||
from helper import LazyLogger # 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 entrypoint import Events # noqa: E402
|
||||||
from helper import LazyLogger # 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 threading
|
||||||
import sys
|
|
||||||
|
|
||||||
from kodi_six import xbmc, xbmcaddon, xbmcvfs
|
from kodi_six import xbmc
|
||||||
|
|
||||||
#################################################################################################
|
|
||||||
|
|
||||||
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 Service # noqa: E402
|
from entrypoint import Service # noqa: E402
|
||||||
from helper.utils import settings # noqa: E402
|
from helper.utils import settings # noqa: E402
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
import sys
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
sys.path.insert(0, 'jellyfin_kodi')
|
from jellyfin_kodi.jellyfin.utils import clean_none_dict_values
|
||||||
|
|
||||||
from jellyfin.utils import clean_none_dict_values # noqa: E402
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("obj,expected", [
|
@pytest.mark.parametrize("obj,expected", [
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import division, absolute_import, print_function, unicode_literals
|
from __future__ import division, absolute_import, print_function, unicode_literals
|
||||||
|
|
||||||
import sys
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
sys.path.insert(0, 'jellyfin_kodi')
|
from jellyfin_kodi.helper.utils import values
|
||||||
|
|
||||||
from helper.utils import values # noqa: E402
|
|
||||||
|
|
||||||
item1 = {'foo': 123, 'bar': 456, 'baz': 789}
|
item1 = {'foo': 123, 'bar': 456, 'baz': 789}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue