mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-09-18 20:44:39 +00:00
Change emby to jellyfin in functions, variables etc.
This commit is contained in:
parent
647636430f
commit
233192863a
39 changed files with 273 additions and 278 deletions
|
@ -8,11 +8,11 @@ import xbmc
|
|||
import xbmcvfs
|
||||
|
||||
from helper import loghandler
|
||||
from emby import Emby
|
||||
from jellyfin import Jellyfin
|
||||
|
||||
#################################################################################################
|
||||
|
||||
Emby.set_loghandler(loghandler.LogHandler, logging.DEBUG)
|
||||
Jellyfin.set_loghandler(loghandler.LogHandler, logging.DEBUG)
|
||||
loghandler.reset()
|
||||
loghandler.config()
|
||||
LOG = logging.getLogger('JELLYFIN.entrypoint')
|
||||
|
|
|
@ -17,7 +17,7 @@ import xbmcplugin
|
|||
import xbmcaddon
|
||||
|
||||
import client
|
||||
from database import reset, get_sync, Database, emby_db, get_credentials
|
||||
from database import reset, get_sync, Database, jellyfin_db, get_credentials
|
||||
from objects import Objects, Actions
|
||||
from downloader import TheVoid
|
||||
from helper import _, event, settings, window, dialog, api, JSONRPC
|
||||
|
@ -130,14 +130,14 @@ def listing():
|
|||
|
||||
''' Display all jellyfin nodes and dynamic entries when appropriate.
|
||||
'''
|
||||
total = int(window('Emby.nodes.total') or 0)
|
||||
total = int(window('Jellyfin.nodes.total') or 0)
|
||||
sync = get_sync()
|
||||
whitelist = [x.replace('Mixed:', "") for x in sync['Whitelist']]
|
||||
servers = get_credentials()['Servers'][1:]
|
||||
|
||||
for i in range(total):
|
||||
|
||||
window_prop = "Emby.nodes.%s" % i
|
||||
window_prop = "Jellyfin.nodes.%s" % i
|
||||
path = window('%s.index' % window_prop)
|
||||
|
||||
if not path:
|
||||
|
@ -543,12 +543,12 @@ def get_video_extras(item_id, path, server_id=None):
|
|||
"""
|
||||
def getVideoFiles(jellyfinId,jellyfinPath):
|
||||
#returns the video files for the item as plugin listing, can be used for browsing the actual files or videoextras etc.
|
||||
emby = embyserver.Read_EmbyServer()
|
||||
if not embyId:
|
||||
if "plugin.video.jellyfin" in embyPath:
|
||||
embyId = embyPath.split("/")[-2]
|
||||
if embyId:
|
||||
item = emby.getItem(embyId)
|
||||
jellyfin = jellyfinserver.Read_JellyfinServer()
|
||||
if not jellyfinId:
|
||||
if "plugin.video.jellyfin" in jellyfinPath:
|
||||
jellyfinId = jellyfinPath.split("/")[-2]
|
||||
if jellyfinId:
|
||||
item = jellyfin.getItem(jellyfinId)
|
||||
putils = playutils.PlayUtils(item)
|
||||
if putils.isDirectPlay():
|
||||
#only proceed if we can access the files directly. TODO: copy local on the fly if accessed outside
|
||||
|
@ -571,9 +571,9 @@ def get_next_episodes(item_id, limit):
|
|||
|
||||
''' Only for synced content.
|
||||
'''
|
||||
with Database('jellyfin') as embydb:
|
||||
with Database('jellyfin') as jellyfindb:
|
||||
|
||||
db = emby_db.EmbyDatabase(embydb.cursor)
|
||||
db = jellyfin_db.JellyfinDatabase(jellyfindb.cursor)
|
||||
library = db.get_view_name(item_id)
|
||||
|
||||
if not library:
|
||||
|
@ -784,8 +784,8 @@ def get_themes():
|
|||
|
||||
return
|
||||
|
||||
with Database('jellyfin') as embydb:
|
||||
all_views = emby_db.EmbyDatabase(embydb.cursor).get_views()
|
||||
with Database('jellyfin') as jellyfindb:
|
||||
all_views = jellyfin_db.JellyfinDatabase(jellyfindb.cursor).get_views()
|
||||
views = [x[0] for x in all_views if x[2] in ('movies', 'tvshows', 'mixed')]
|
||||
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@ import requests
|
|||
from views import Views, verify_kodi_defaults
|
||||
from helper import _, window, settings, event, dialog, find, compare_version
|
||||
from downloader import get_objects
|
||||
from emby import Emby
|
||||
from database import Database, emby_db, reset
|
||||
from jellyfin import Jellyfin
|
||||
from database import Database, jellyfin_db, reset
|
||||
|
||||
#################################################################################################
|
||||
|
||||
|
@ -143,7 +143,7 @@ class Service(xbmc.Monitor):
|
|||
def stop_default(self):
|
||||
|
||||
window('jellyfin_online', clear=True)
|
||||
Emby().close()
|
||||
Jellyfin().close()
|
||||
|
||||
if self.library_thread is not None:
|
||||
|
||||
|
@ -154,9 +154,9 @@ class Service(xbmc.Monitor):
|
|||
|
||||
''' Check the database version to ensure we do not need to do a reset.
|
||||
'''
|
||||
with Database('jellyfin') as embydb:
|
||||
with Database('jellyfin') as jellyfindb:
|
||||
|
||||
version = emby_db.EmbyDatabase(embydb.cursor).get_version()
|
||||
version = jellyfin_db.JellyfinDatabase(jellyfindb.cursor).get_version()
|
||||
LOG.info("---[ db/%s ]", version)
|
||||
|
||||
if version and compare_version(version, "3.1.0") < 0:
|
||||
|
@ -206,8 +206,8 @@ class Service(xbmc.Monitor):
|
|||
LOG.info("--[ new objects/%s ]", objects.version)
|
||||
|
||||
try:
|
||||
if compare_version(self.settings['addon_version'], objects.embyversion) < 0:
|
||||
dialog("ok", heading="{jellyfin}", line1="%s %s" % (_(33160), objects.embyversion))
|
||||
if compare_version(self.settings['addon_version'], objects.jellyfinversion) < 0:
|
||||
dialog("ok", heading="{jellyfin}", line1="%s %s" % (_(33160), objects.jellyfinversion))
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
@ -386,7 +386,7 @@ class Service(xbmc.Monitor):
|
|||
self.library_thread.stop_client()
|
||||
self.library_thread = None
|
||||
|
||||
Emby.close_all()
|
||||
Jellyfin.close_all()
|
||||
self.monitor.server = []
|
||||
self.monitor.sleep = True
|
||||
|
||||
|
@ -506,7 +506,7 @@ class Service(xbmc.Monitor):
|
|||
for prop in properties:
|
||||
window(prop, clear=True)
|
||||
|
||||
Emby.close_all()
|
||||
Jellyfin.close_all()
|
||||
|
||||
if self.library_thread is not None:
|
||||
self.library_thread.stop_client()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue