mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
commit
7c394793e7
10 changed files with 13 additions and 13 deletions
2
.github/workflows/test.yaml
vendored
2
.github/workflows/test.yaml
vendored
|
@ -50,7 +50,7 @@ jobs:
|
||||||
uses: codecov/codecov-action@v3.1.1
|
uses: codecov/codecov-action@v3.1.1
|
||||||
if: ${{ matrix.py_version == '3.9' }}
|
if: ${{ matrix.py_version == '3.9' }}
|
||||||
|
|
||||||
- name: Publish Test Atrifact
|
- name: Publish Test Artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# How to contribute
|
# How to contribute
|
||||||
|
|
||||||
Thanks you for contributing to Jellyfin for Kodi!
|
Thank you for contributing to Jellyfin for Kodi!
|
||||||
|
|
||||||
* Make pull requests towards the **master** branch;
|
* Make pull requests towards the **master** branch;
|
||||||
* Keep the maximum line length shorter than 100 characters to keep things clean and readable;
|
* Keep the maximum line length shorter than 100 characters to keep things clean and readable;
|
||||||
|
|
|
@ -58,7 +58,7 @@ def get_device_name():
|
||||||
|
|
||||||
''' Detect the device name. If deviceNameOpt, then
|
''' Detect the device name. If deviceNameOpt, then
|
||||||
use the device name in the add-on settings.
|
use the device name in the add-on settings.
|
||||||
Otherwise fallback to the Kodi device name.
|
Otherwise, fallback to the Kodi device name.
|
||||||
'''
|
'''
|
||||||
if not settings('deviceNameOpt.bool'):
|
if not settings('deviceNameOpt.bool'):
|
||||||
device_name = xbmc.getInfoLabel('System.FriendlyName')
|
device_name = xbmc.getInfoLabel('System.FriendlyName')
|
||||||
|
|
|
@ -235,7 +235,7 @@ def _get_items(query, server_id=None):
|
||||||
# multiprocessing.dummy.Pool completes all requests in multiple threads but has to
|
# multiprocessing.dummy.Pool completes all requests in multiple threads but has to
|
||||||
# complete all tasks before allowing any results to be processed. ThreadPoolExecutor
|
# complete all tasks before allowing any results to be processed. ThreadPoolExecutor
|
||||||
# allows for completed tasks to be processed while other tasks are completed on other
|
# allows for completed tasks to be processed while other tasks are completed on other
|
||||||
# threads. Dont be a dummy.Pool, be a ThreadPoolExecutor
|
# threads. Don't be a dummy.Pool, be a ThreadPoolExecutor
|
||||||
with concurrent.futures.ThreadPoolExecutor(dthreads) as p:
|
with concurrent.futures.ThreadPoolExecutor(dthreads) as p:
|
||||||
# dictionary for storing the jobs and their results
|
# dictionary for storing the jobs and their results
|
||||||
jobs = {}
|
jobs = {}
|
||||||
|
|
|
@ -210,7 +210,7 @@ class FullSync(object):
|
||||||
|
|
||||||
def process_library(self, library_id):
|
def process_library(self, library_id):
|
||||||
|
|
||||||
''' Add a library by it's id. Create a node and a playlist whenever appropriate.
|
''' Add a library by its id. Create a node and a playlist whenever appropriate.
|
||||||
'''
|
'''
|
||||||
media = {
|
media = {
|
||||||
'movies': self.movies,
|
'movies': self.movies,
|
||||||
|
|
|
@ -4,7 +4,7 @@ from __future__ import division, absolute_import, print_function, unicode_litera
|
||||||
|
|
||||||
class LazyLogger(object):
|
class LazyLogger(object):
|
||||||
"""`helper.loghandler.getLogger()` is used everywhere.
|
"""`helper.loghandler.getLogger()` is used everywhere.
|
||||||
This class helps avoiding import errors.
|
This class helps to avoid import errors.
|
||||||
"""
|
"""
|
||||||
__logger = None
|
__logger = None
|
||||||
__logger_name = None
|
__logger_name = None
|
||||||
|
|
|
@ -515,7 +515,7 @@ class PlayUtils(object):
|
||||||
|
|
||||||
def set_external_subs(self, source, listitem):
|
def set_external_subs(self, source, listitem):
|
||||||
|
|
||||||
''' Try to download external subs locally so we can label them.
|
''' Try to download external subs locally, so we can label them.
|
||||||
Since Jellyfin returns all possible tracks together, sort them.
|
Since Jellyfin returns all possible tracks together, sort them.
|
||||||
IsTextSubtitleStream if true, is available to download from server.
|
IsTextSubtitleStream if true, is available to download from server.
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -20,7 +20,7 @@ LOG = LazyLogger(__name__)
|
||||||
|
|
||||||
def callback(message, data):
|
def callback(message, data):
|
||||||
|
|
||||||
''' Callback function should received message, data
|
''' Callback function should receive message, data
|
||||||
message: string
|
message: string
|
||||||
data: json dictionary
|
data: json dictionary
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -77,7 +77,7 @@ class Monitor(xbmc.Monitor):
|
||||||
Otherwise the next played item will be added the previous queue.
|
Otherwise the next played item will be added the previous queue.
|
||||||
'''
|
'''
|
||||||
if method == "Player.OnStop":
|
if method == "Player.OnStop":
|
||||||
xbmc.sleep(3000) # let's wait for the player so we don't clear the canceled playlist by mistake.
|
xbmc.sleep(3000) # let's wait for the player, so we don't clear the canceled playlist by mistake.
|
||||||
|
|
||||||
if xbmc.getCondVisibility("!Player.HasMedia + !Window.IsVisible(busydialog)"):
|
if xbmc.getCondVisibility("!Player.HasMedia + !Window.IsVisible(busydialog)"):
|
||||||
|
|
||||||
|
@ -247,7 +247,7 @@ class Monitor(xbmc.Monitor):
|
||||||
|
|
||||||
elif command == 'SetVolume':
|
elif command == 'SetVolume':
|
||||||
xbmc.executebuiltin('SetVolume(%s[,showvolumebar])' % args['Volume'])
|
xbmc.executebuiltin('SetVolume(%s[,showvolumebar])' % args['Volume'])
|
||||||
# Kodi needs a bit of time to update it's current status
|
# Kodi needs a bit of time to update its current status
|
||||||
xbmc.sleep(500)
|
xbmc.sleep(500)
|
||||||
self.player.report_playback()
|
self.player.report_playback()
|
||||||
|
|
||||||
|
|
|
@ -191,7 +191,7 @@ class Views(object):
|
||||||
playlist_path = translate_path("special://profile/playlists/video")
|
playlist_path = translate_path("special://profile/playlists/video")
|
||||||
index = 0
|
index = 0
|
||||||
|
|
||||||
# Kodi 19 doesn't seem to create this directory on it's own
|
# Kodi 19 doesn't seem to create this directory on its own
|
||||||
if not os.path.isdir(node_path):
|
if not os.path.isdir(node_path):
|
||||||
os.makedirs(node_path)
|
os.makedirs(node_path)
|
||||||
|
|
||||||
|
@ -680,7 +680,7 @@ class Views(object):
|
||||||
def window_nodes(self):
|
def window_nodes(self):
|
||||||
|
|
||||||
''' Just read from the database and populate based on SortedViews
|
''' Just read from the database and populate based on SortedViews
|
||||||
Setup the window properties that reflect the jellyfin server views and more.
|
Set up the window properties that reflect the jellyfin server views and more.
|
||||||
'''
|
'''
|
||||||
self.window_clear()
|
self.window_clear()
|
||||||
self.window_clear('Jellyfin.wnodes')
|
self.window_clear('Jellyfin.wnodes')
|
||||||
|
@ -937,7 +937,7 @@ class Views(object):
|
||||||
|
|
||||||
def delete_playlist_by_id(self, view_id):
|
def delete_playlist_by_id(self, view_id):
|
||||||
|
|
||||||
''' Remove playlist based based on view_id.
|
''' Remove playlist based on view_id.
|
||||||
'''
|
'''
|
||||||
path = translate_path("special://profile/playlists/video/")
|
path = translate_path("special://profile/playlists/video/")
|
||||||
_, files = xbmcvfs.listdir(path)
|
_, files = xbmcvfs.listdir(path)
|
||||||
|
|
Loading…
Reference in a new issue