Rebrand addon name and id and make it compatible with Jellyfin

This commit is contained in:
Claus Vium 2019-01-31 23:23:55 +01:00
commit 168bab2b01
37 changed files with 136 additions and 142 deletions

View file

@ -82,7 +82,7 @@ def get_device_id(reset=False):
if client_id:
return client_id
directory = xbmc.translatePath('special://profile/addon_data/plugin.video.emby/').decode('utf-8')
directory = xbmc.translatePath('special://profile/addon_data/plugin.video.jellyfin/').decode('utf-8')
if not xbmcvfs.exists(directory):
xbmcvfs.mkdir(directory)

View file

@ -238,7 +238,7 @@ def reset():
if dialog("yesno", heading="{emby}", line1=_(33086)):
reset_artwork()
addon_data = xbmc.translatePath("special://profile/addon_data/plugin.video.emby/").decode('utf-8')
addon_data = xbmc.translatePath("special://profile/addon_data/plugin.video.jellyfin/").decode('utf-8')
if dialog("yesno", heading="{emby}", line1=_(33087)):
@ -326,7 +326,7 @@ def reset_artwork():
def get_sync():
path = xbmc.translatePath("special://profile/addon_data/plugin.video.emby/").decode('utf-8')
path = xbmc.translatePath("special://profile/addon_data/plugin.video.jellyfin/").decode('utf-8')
if not xbmcvfs.exists(path):
xbmcvfs.mkdirs(path)
@ -346,7 +346,7 @@ def get_sync():
def save_sync(sync):
path = xbmc.translatePath("special://profile/addon_data/plugin.video.emby/").decode('utf-8')
path = xbmc.translatePath("special://profile/addon_data/plugin.video.jellyfin/").decode('utf-8')
if not xbmcvfs.exists(path):
xbmcvfs.mkdirs(path)
@ -358,7 +358,7 @@ def save_sync(sync):
def get_credentials():
path = xbmc.translatePath("special://profile/addon_data/plugin.video.emby/").decode('utf-8')
path = xbmc.translatePath("special://profile/addon_data/plugin.video.jellyfin/").decode('utf-8')
if not xbmcvfs.exists(path):
xbmcvfs.mkdirs(path)
@ -384,7 +384,7 @@ def get_credentials():
def save_credentials(credentials):
credentials = credentials or {}
path = xbmc.translatePath("special://profile/addon_data/plugin.video.emby/").decode('utf-8')
path = xbmc.translatePath("special://profile/addon_data/plugin.video.jellyfin/").decode('utf-8')
if not xbmcvfs.exists(path):
xbmcvfs.mkdirs(path)

View file

@ -24,7 +24,7 @@ from emby.core.exceptions import HTTPException
LOG = logging.getLogger("EMBY."+__name__)
LIMIT = min(int(settings('limitIndex') or 50), 50)
CACHE = xbmc.translatePath(os.path.join(xbmcaddon.Addon(id='plugin.video.emby').getAddonInfo('profile').decode('utf-8'), 'emby')).decode('utf-8')
CACHE = xbmc.translatePath(os.path.join(xbmcaddon.Addon(id='plugin.video.jellyfin').getAddonInfo('profile').decode('utf-8'), 'emby')).decode('utf-8')
#################################################################################################

View file

@ -43,7 +43,7 @@ def get_server_address(server, mode):
class ConnectionManager(object):
min_server_version = "3.0.5930"
min_server_version = "10.1.0"
server_version = min_server_version
user = {}
server_id = None

View file

@ -18,7 +18,7 @@ from objects import Actions
#################################################################################################
LOG = logging.getLogger("EMBY."+__name__)
XML_PATH = (xbmcaddon.Addon('plugin.video.emby').getAddonInfo('path'), "default", "1080i")
XML_PATH = (xbmcaddon.Addon('plugin.video.jellyfin').getAddonInfo('path'), "default", "1080i")
OPTIONS = {
'Refresh': _(30410),
'Delete': _(30409),
@ -153,7 +153,7 @@ class Context(object):
TheVoid('FavoriteItem', {'ServerId': self.server, 'Id': self.item['Id'], 'Favorite': False})
elif selected == OPTIONS['Addon']:
xbmc.executebuiltin('Addon.OpenSettings(plugin.video.emby)')
xbmc.executebuiltin('Addon.OpenSettings(plugin.video.jellyfin)')
elif selected == OPTIONS['Delete']:
self.delete_item()

View file

@ -109,7 +109,7 @@ class Events(object):
elif mode == 'removeserver':
event('RemoveServer', {'Id': server})
elif mode == 'settings':
xbmc.executebuiltin('Addon.OpenSettings(plugin.video.emby)')
xbmc.executebuiltin('Addon.OpenSettings(plugin.video.jellyfin)')
elif mode == 'adduser':
add_user()
elif mode == 'checkupdate':
@ -153,13 +153,13 @@ def listing():
if view_id and node in ('movies', 'tvshows', 'musicvideos', 'music', 'mixed') and view_id not in whitelist:
label = "%s %s" % (label.decode('utf-8'), _(33166))
context.append((_(33123), "RunPlugin(plugin://plugin.video.emby/?mode=synclib&id=%s)" % view_id))
context.append((_(33123), "RunPlugin(plugin://plugin.video.jellyfin/?mode=synclib&id=%s)" % view_id))
if view_id and node in ('movies', 'tvshows', 'musicvideos', 'music') and view_id in whitelist:
context.append((_(33136), "RunPlugin(plugin://plugin.video.emby/?mode=updatelib&id=%s)" % view_id))
context.append((_(33132), "RunPlugin(plugin://plugin.video.emby/?mode=repairlib&id=%s)" % view_id))
context.append((_(33133), "RunPlugin(plugin://plugin.video.emby/?mode=removelib&id=%s)" % view_id))
context.append((_(33136), "RunPlugin(plugin://plugin.video.jellyfin/?mode=updatelib&id=%s)" % view_id))
context.append((_(33132), "RunPlugin(plugin://plugin.video.jellyfin/?mode=repairlib&id=%s)" % view_id))
context.append((_(33133), "RunPlugin(plugin://plugin.video.jellyfin/?mode=removelib&id=%s)" % view_id))
LOG.debug("--[ listing/%s/%s ] %s", node, label, path)
@ -177,25 +177,25 @@ def listing():
context = []
if server.get('ManualAddress'):
context.append((_(33141), "RunPlugin(plugin://plugin.video.emby/?mode=removeserver&server=%s)" % server['Id']))
context.append((_(33141), "RunPlugin(plugin://plugin.video.jellyfin/?mode=removeserver&server=%s)" % server['Id']))
if 'AccessToken' not in server:
directory("%s (%s)" % (server['Name'], _(30539)), "plugin://plugin.video.emby/?mode=login&server=%s" % server['Id'], False, context=context)
directory("%s (%s)" % (server['Name'], _(30539)), "plugin://plugin.video.jellyfin/?mode=login&server=%s" % server['Id'], False, context=context)
else:
directory(server['Name'], "plugin://plugin.video.emby/?mode=browse&server=%s" % server['Id'], context=context)
directory(server['Name'], "plugin://plugin.video.jellyfin/?mode=browse&server=%s" % server['Id'], context=context)
directory(_(33194), "plugin://plugin.video.emby/?mode=managelibs", True)
directory(_(33134), "plugin://plugin.video.emby/?mode=addserver", False)
directory(_(33054), "plugin://plugin.video.emby/?mode=adduser", False)
directory(_(5), "plugin://plugin.video.emby/?mode=settings", False)
directory(_(33058), "plugin://plugin.video.emby/?mode=reset", False)
directory(_(33192), "plugin://plugin.video.emby/?mode=restartservice", False)
directory(_(33194), "plugin://plugin.video.jellyfin/?mode=managelibs", True)
directory(_(33134), "plugin://plugin.video.jellyfin/?mode=addserver", False)
directory(_(33054), "plugin://plugin.video.jellyfin/?mode=adduser", False)
directory(_(5), "plugin://plugin.video.jellyfin/?mode=settings", False)
directory(_(33058), "plugin://plugin.video.jellyfin/?mode=reset", False)
directory(_(33192), "plugin://plugin.video.jellyfin/?mode=restartservice", False)
if settings('backupPath'):
directory(_(33092), "plugin://plugin.video.emby/?mode=backup", False)
directory(_(33092), "plugin://plugin.video.jellyfin/?mode=backup", False)
directory(_(33163), None, False, artwork="special://home/addons/plugin.video.emby/donations.png")
directory(_(33163), None, False, artwork="special://home/addons/plugin.video.jellyfin/donations.png")
xbmcplugin.setContent(int(sys.argv[1]), 'files')
xbmcplugin.endOfDirectory(int(sys.argv[1]))
@ -216,20 +216,20 @@ def directory(label, path, folder=True, artwork=None, fanart=None, context=None)
def dir_listitem(label, path, artwork=None, fanart=None):
li = xbmcgui.ListItem(label, path=path)
li.setThumbnailImage(artwork or "special://home/addons/plugin.video.emby/icon.png")
li.setArt({"fanart": fanart or "special://home/addons/plugin.video.emby/fanart.jpg"})
li.setArt({"landscape": artwork or fanart or "special://home/addons/plugin.video.emby/fanart.jpg"})
li.setThumbnailImage(artwork or "special://home/addons/plugin.video.jellyfin/icon.png")
li.setArt({"fanart": fanart or "special://home/addons/plugin.video.jellyfin/fanart.jpg"})
li.setArt({"landscape": artwork or fanart or "special://home/addons/plugin.video.jellyfin/fanart.jpg"})
return li
def manage_libraries():
directory(_(33098), "plugin://plugin.video.emby/?mode=refreshboxsets", False)
directory(_(33154), "plugin://plugin.video.emby/?mode=addlibs", False)
directory(_(33139), "plugin://plugin.video.emby/?mode=updatelibs", False)
directory(_(33140), "plugin://plugin.video.emby/?mode=repairlibs", False)
directory(_(33184), "plugin://plugin.video.emby/?mode=removelibs", False)
directory(_(33060), "plugin://plugin.video.emby/?mode=thememedia", False)
directory(_(33098), "plugin://plugin.video.jellyfin/?mode=refreshboxsets", False)
directory(_(33154), "plugin://plugin.video.jellyfin/?mode=addlibs", False)
directory(_(33139), "plugin://plugin.video.jellyfin/?mode=updatelibs", False)
directory(_(33140), "plugin://plugin.video.jellyfin/?mode=repairlibs", False)
directory(_(33184), "plugin://plugin.video.jellyfin/?mode=removelibs", False)
directory(_(33060), "plugin://plugin.video.jellyfin/?mode=thememedia", False)
xbmcplugin.setContent(int(sys.argv[1]), 'files')
xbmcplugin.endOfDirectory(int(sys.argv[1]))
@ -343,16 +343,16 @@ def browse(media, view_id=None, folder=None, server_id=None):
'folder': item['Id'],
'server': server_id
}
path = "%s?%s" % ("plugin://plugin.video.emby/", urllib.urlencode(params))
path = "%s?%s" % ("plugin://plugin.video.jellyfin/", urllib.urlencode(params))
context = []
if item['Type'] in ('Series', 'Season', 'Playlist'):
context.append(("Play", "RunPlugin(plugin://plugin.video.emby/?mode=playlist&id=%s&server=%s)" % (item['Id'], server_id)))
context.append(("Play", "RunPlugin(plugin://plugin.video.jellyfin/?mode=playlist&id=%s&server=%s)" % (item['Id'], server_id)))
if item['UserData']['Played']:
context.append((_(16104), "RunPlugin(plugin://plugin.video.emby/?mode=unwatched&id=%s&server=%s)" % (item['Id'], server_id)))
context.append((_(16104), "RunPlugin(plugin://plugin.video.jellyfin/?mode=unwatched&id=%s&server=%s)" % (item['Id'], server_id)))
else:
context.append((_(16103), "RunPlugin(plugin://plugin.video.emby/?mode=watched&id=%s&server=%s)" % (item['Id'], server_id)))
context.append((_(16103), "RunPlugin(plugin://plugin.video.jellyfin/?mode=watched&id=%s&server=%s)" % (item['Id'], server_id)))
li.addContextMenuItems(context)
list_li.append((path, li, True))
@ -366,7 +366,7 @@ def browse(media, view_id=None, folder=None, server_id=None):
'folder': 'genres-%s' % item['Id'],
'server': server_id
}
path = "%s?%s" % ("plugin://plugin.video.emby/", urllib.urlencode(params))
path = "%s?%s" % ("plugin://plugin.video.jellyfin/", urllib.urlencode(params))
list_li.append((path, li, True))
else:
@ -376,14 +376,14 @@ def browse(media, view_id=None, folder=None, server_id=None):
'mode': "play",
'server': server_id
}
path = "%s?%s" % ("plugin://plugin.video.emby/", urllib.urlencode(params))
path = "%s?%s" % ("plugin://plugin.video.jellyfin/", urllib.urlencode(params))
li.setProperty('path', path)
context = [(_(13412), "RunPlugin(plugin://plugin.video.emby/?mode=playlist&id=%s&server=%s)" % (item['Id'], server_id))]
context = [(_(13412), "RunPlugin(plugin://plugin.video.jellyfin/?mode=playlist&id=%s&server=%s)" % (item['Id'], server_id))]
if item['UserData']['Played']:
context.append((_(16104), "RunPlugin(plugin://plugin.video.emby/?mode=unwatched&id=%s&server=%s)" % (item['Id'], server_id)))
context.append((_(16104), "RunPlugin(plugin://plugin.video.jellyfin/?mode=unwatched&id=%s&server=%s)" % (item['Id'], server_id)))
else:
context.append((_(16103), "RunPlugin(plugin://plugin.video.emby/?mode=watched&id=%s&server=%s)" % (item['Id'], server_id)))
context.append((_(16103), "RunPlugin(plugin://plugin.video.jellyfin/?mode=watched&id=%s&server=%s)" % (item['Id'], server_id)))
li.addContextMenuItems(context)
@ -419,7 +419,7 @@ def browse_subfolders(media, view_id, server_id=None):
'folder': view_id if node[0] == 'all' else node[0],
'server': server_id
}
path = "%s?%s" % ("plugin://plugin.video.emby/", urllib.urlencode(params))
path = "%s?%s" % ("plugin://plugin.video.jellyfin/", urllib.urlencode(params))
directory(node[1] or view['Name'], path)
xbmcplugin.setContent(int(sys.argv[1]), 'files')
@ -443,7 +443,7 @@ def browse_letters(media, view_id, server_id=None):
'folder': 'firstletter-%s' % node,
'server': server_id
}
path = "%s?%s" % ("plugin://plugin.video.emby/", urllib.urlencode(params))
path = "%s?%s" % ("plugin://plugin.video.jellyfin/", urllib.urlencode(params))
directory(node, path)
xbmcplugin.setContent(int(sys.argv[1]), 'files')
@ -489,7 +489,7 @@ def get_fanart(item_id, path, server_id=None):
''' Get extra fanart for listitems. This is called by skinhelper.
Images are stored locally, due to the Kodi caching system.
'''
if not item_id and 'plugin.video.emby' in path:
if not item_id and 'plugin.video.jellyfin' in path:
item_id = path.split('/')[-2]
if not item_id:
@ -533,7 +533,7 @@ def get_video_extras(item_id, path, server_id=None):
''' Returns the video files for the item as plugin listing, can be used
to browse actual files or video extras, etc.
'''
if not item_id and 'plugin.video.emby' in path:
if not item_id and 'plugin.video.jellyfin' in path:
item_id = path.split('/')[-2]
if not item_id:
@ -547,7 +547,7 @@ def get_video_extras(item_id, path, server_id=None):
#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.emby" in embyPath:
if "plugin.video.jellyfin" in embyPath:
embyId = embyPath.split("/")[-2]
if embyId:
item = emby.getItem(embyId)
@ -769,7 +769,7 @@ def get_themes():
from helper.playutils import PlayUtils
from helper.xmls import tvtunes_nfo
library = xbmc.translatePath("special://profile/addon_data/plugin.video.emby/library").decode('utf-8')
library = xbmc.translatePath("special://profile/addon_data/plugin.video.jellyfin/library").decode('utf-8')
play = settings('useDirectPaths') == "1"
if not xbmcvfs.exists(library + '/'):
@ -863,8 +863,8 @@ def backup():
delete_folder(backup)
addon_data = xbmc.translatePath("special://profile/addon_data/plugin.video.emby").decode('utf-8')
destination_data = os.path.join(backup, "addon_data", "plugin.video.emby")
addon_data = xbmc.translatePath("special://profile/addon_data/plugin.video.jellyfin").decode('utf-8')
destination_data = os.path.join(backup, "addon_data", "plugin.video.jellyfin")
destination_databases = os.path.join(backup, "Database")
if not xbmcvfs.mkdirs(path) or not xbmcvfs.mkdirs(destination_databases):

View file

@ -180,7 +180,8 @@ class Service(xbmc.Monitor):
'''
LOG.info("--[ check updates/%s ]", objects.version)
kodi = "DEV" if settings('devMode.bool') else xbmc.getInfoLabel('System.BuildVersion')
# FIXME we do not want their updates
return False
try:
versions = requests.get('http://kodi.emby.media/Public%20testing/Dependencies/databases.json').json()
build = find(versions, kodi)
@ -220,10 +221,10 @@ class Service(xbmc.Monitor):
''' All notifications are sent via NotifyAll built-in or Kodi.
Central hub.
'''
if sender.lower() not in ('plugin.video.emby', 'xbmc'):
if sender.lower() not in ('plugin.video.jellyfin', 'xbmc'):
return
if sender == 'plugin.video.emby':
if sender == 'plugin.video.jellyfin':
method = method.split('.')[1]
if method not in ('ServerUnreachable', 'ServerShuttingDown', 'UserDataChanged', 'ServerConnect',

View file

@ -503,7 +503,7 @@ class PlayUtils(object):
''' Download external subtitles to temp folder
to be able to have proper names to streams.
'''
temp = xbmc.translatePath("special://profile/addon_data/plugin.video.emby/temp/").decode('utf-8')
temp = xbmc.translatePath("special://profile/addon_data/plugin.video.jellyfin/temp/").decode('utf-8')
if not xbmcvfs.exists(temp):
xbmcvfs.mkdir(temp)

View file

@ -22,7 +22,7 @@ def _(string):
if type(string) != int:
string = STRINGS[string]
result = xbmcaddon.Addon('plugin.video.emby').getLocalizedString(string)
result = xbmcaddon.Addon('plugin.video.jellyfin').getLocalizedString(string)
if not result:
result = xbmc.getLocalizedString(string)

View file

@ -26,7 +26,7 @@ LOG = logging.getLogger("EMBY."+__name__)
#################################################################################################
def addon_id():
return "plugin.video.emby"
return "plugin.video.jellyfin"
def kodi_version():
return xbmc.getInfoLabel('System.BuildVersion')[:2]
@ -134,7 +134,7 @@ def event(method, data=None, sender=None, hexlify=False):
''' Data is a dictionary.
'''
data = data or {}
sender = sender or "plugin.video.emby"
sender = sender or "plugin.video.jellyfin"
if hexlify:
data = '\\"[\\"{0}\\"]\\"'.format(binascii.hexlify(json.dumps(data)))
@ -150,7 +150,7 @@ def dialog(dialog_type, *args, **kwargs):
if "icon" in kwargs:
kwargs['icon'] = kwargs['icon'].replace("{emby}",
"special://home/addons/plugin.video.emby/icon.png")
"special://home/addons/plugin.video.jellyfin/icon.png")
if "heading" in kwargs:
kwargs['heading'] = kwargs['heading'].replace("{emby}", _('addon_name'))

View file

@ -50,10 +50,10 @@ class Monitor(xbmc.Monitor):
def onNotification(self, sender, method, data):
if sender.lower() not in ('plugin.video.emby', 'xbmc', 'upnextprovider.signal'):
if sender.lower() not in ('plugin.video.jellyfin', 'xbmc', 'upnextprovider.signal'):
return
if sender == 'plugin.video.emby':
if sender == 'plugin.video.jellyfin':
method = method.split('.')[1]
if method not in ('GetItem', 'ReportProgressRequested', 'LoadServer', 'RandomItems', 'Recommended',
@ -69,7 +69,7 @@ class Monitor(xbmc.Monitor):
elif sender.startswith('upnextprovider'):
method = method.split('.')[1]
if method not in ('plugin.video.emby_play_action'):
if method not in ('plugin.video.jellyfin_play_action'):
return
data = json.loads(data)
@ -312,7 +312,7 @@ class Monitor(xbmc.Monitor):
"Mute,Unmute,SetVolume,"
"Play,Playstate,PlayNext,PlayMediaSource"
),
'IconUrl': "https://raw.githubusercontent.com/MediaBrowser/plugin.video.emby/develop/kodi_icon.png",
'IconUrl': "https://raw.githubusercontent.com/MediaBrowser/plugin.video.jellyfin/develop/kodi_icon.png",
})
session = server['api'].get_device(self.device_id)

View file

@ -215,7 +215,7 @@ class Actions(object):
LOG.info("[ playlist/%s ] %s", item['Id'], item['Name'])
self.set_listitem(item, listitem, None, False)
path = "plugin://plugin.video.emby/?mode=play&id=%s&playlist=true" % item['Id']
path = "plugin://plugin.video.jellyfin/?mode=play&id=%s&playlist=true" % item['Id']
listitem.setPath(path)
playlist.add(path, listitem, index)
@ -312,9 +312,9 @@ class Actions(object):
obj['Artwork']['Thumb'] = obj['Artwork']['Thumb'] or ""
if not intro and not obj['Type'] == 'Trailer':
obj['Artwork']['Primary'] = obj['Artwork']['Primary'] or "special://home/addons/plugin.video.emby/icon.png"
obj['Artwork']['Primary'] = obj['Artwork']['Primary'] or "special://home/addons/plugin.video.jellyfin/icon.png"
else:
obj['Artwork']['Primary'] = obj['Artwork']['Primary'] or obj['Artwork']['Thumb'] or (obj['Artwork']['Backdrop'][0] if len(obj['Artwork']['Backdrop']) else "special://home/addons/plugin.video.emby/fanart.jpg")
obj['Artwork']['Primary'] = obj['Artwork']['Primary'] or obj['Artwork']['Thumb'] or (obj['Artwork']['Backdrop'][0] if len(obj['Artwork']['Backdrop']) else "special://home/addons/plugin.video.jellyfin/fanart.jpg")
obj['Artwork']['Primary'] += "&KodiTrailer=true" if obj['Type'] == 'Trailer' else "&KodiCinemaMode=true"
obj['Artwork']['Backdrop'] = [obj['Artwork']['Primary']]
@ -472,9 +472,9 @@ class Actions(object):
obj['Runtime'] = round(float((obj['Runtime'] or 0) / 10000000.0), 6)
obj['PlayCount'] = API.get_playcount(obj['Played'], obj['PlayCount']) or 0
obj['Overlay'] = 7 if obj['Played'] else 6
obj['Artwork']['Primary'] = obj['Artwork']['Primary'] or "special://home/addons/plugin.video.emby/icon.png"
obj['Artwork']['Thumb'] = obj['Artwork']['Thumb'] or "special://home/addons/plugin.video.emby/fanart.jpg"
obj['Artwork']['Backdrop'] = obj['Artwork']['Backdrop'] or ["special://home/addons/plugin.video.emby/fanart.jpg"]
obj['Artwork']['Primary'] = obj['Artwork']['Primary'] or "special://home/addons/plugin.video.jellyfin/icon.png"
obj['Artwork']['Thumb'] = obj['Artwork']['Thumb'] or "special://home/addons/plugin.video.jellyfin/fanart.jpg"
obj['Artwork']['Backdrop'] = obj['Artwork']['Backdrop'] or ["special://home/addons/plugin.video.jellyfin/fanart.jpg"]
metadata = {
@ -657,7 +657,7 @@ class Actions(object):
''' Base resume dialog based on Kodi settings.
'''
LOG.info("Resume dialog called.")
XML_PATH = (xbmcaddon.Addon('plugin.video.emby').getAddonInfo('path'), "default", "1080i")
XML_PATH = (xbmcaddon.Addon('plugin.video.jellyfin').getAddonInfo('path'), "default", "1080i")
dialog = resume.ResumeDialog("script-emby-resume.xml", *XML_PATH)
dialog.set_resume_point("Resume from %s" % str(timedelta(seconds=seektime)).split(".")[0])

View file

@ -169,7 +169,7 @@ class Movies(KodiDb):
if obj['LocalTrailer']:
trailer = self.server['api'].get_local_trailers(obj['Id'])
obj['Trailer'] = "plugin://plugin.video.emby/trailer?id=%s&mode=play" % trailer[0]['Id']
obj['Trailer'] = "plugin://plugin.video.jellyfin/trailer?id=%s&mode=play" % trailer[0]['Id']
elif obj['Trailer']:
obj['Trailer'] = "plugin://plugin.video.youtube/play/?video_id=%s" % obj['Trailer'].rsplit('=', 1)[1]
@ -192,7 +192,7 @@ class Movies(KodiDb):
obj['Path'] = obj['Path'].replace(obj['Filename'], "")
else:
obj['Path'] = "plugin://plugin.video.emby.movies/"
obj['Path'] = "plugin://plugin.video.jellyfin/"
params = {
'filename': obj['Filename'].encode('utf-8'),
'id': obj['Id'],

View file

@ -174,7 +174,7 @@ class MusicVideos(KodiDb):
obj['Path'] = obj['Path'].replace(obj['Filename'], "")
else:
obj['Path'] = "plugin://plugin.video.emby.musicvideos/"
obj['Path'] = "plugin://plugin.video.jellyfin/"
params = {
'filename': obj['Filename'].encode('utf-8'),
'id': obj['Id'],

View file

@ -217,7 +217,7 @@ class TVShows(KodiDb):
if not validate(obj['Path']):
raise Exception("Failed to validate path. User stopped.")
else:
obj['TopLevel'] = "plugin://plugin.video.emby.tvshows/"
obj['TopLevel'] = "plugin://plugin.video.jellyfin/"
obj['Path'] = "%s%s/" % (obj['TopLevel'], obj['Id'])
@ -354,7 +354,7 @@ class TVShows(KodiDb):
if not self.direct_path and obj['Resume']:
temp_obj = dict(obj)
temp_obj['Path'] = "plugin://plugin.video.emby.tvshows/"
temp_obj['Path'] = "plugin://plugin.video.jellyfin/"
temp_obj['PathId'] = self.get_path(*values(temp_obj, QU.get_path_obj))
temp_obj['FileId'] = self.add_file(*values(temp_obj, QU.add_file_obj))
self.update_file(*values(temp_obj, QU.update_file_obj))
@ -419,7 +419,7 @@ class TVShows(KodiDb):
obj['Path'] = obj['Path'].replace(obj['Filename'], "")
else:
obj['Path'] = "plugin://plugin.video.emby.tvshows/%s/" % obj['SeriesId']
obj['Path'] = "plugin://plugin.video.jellyfin/%s/" % obj['SeriesId']
params = {
'filename': obj['Filename'].encode('utf-8'),
'id': obj['Id'],
@ -493,14 +493,14 @@ class TVShows(KodiDb):
temp_obj = dict(obj)
temp_obj['Filename'] = self.get_filename(*values(temp_obj, QU.get_file_obj))
temp_obj['Path'] = "plugin://plugin.video.emby.tvshows/"
temp_obj['Path'] = "plugin://plugin.video.jellyfin/"
self.remove_file(*values(temp_obj, QU.delete_file_obj))
elif not self.direct_path and obj['Resume']:
temp_obj = dict(obj)
temp_obj['Filename'] = self.get_filename(*values(temp_obj, QU.get_file_obj))
temp_obj['PathId'] = self.get_path("plugin://plugin.video.emby.tvshows/")
temp_obj['PathId'] = self.get_path("plugin://plugin.video.jellyfin/")
temp_obj['FileId'] = self.add_file(*values(temp_obj, QU.add_file_obj))
self.update_file(*values(temp_obj, QU.update_file_obj))
self.add_playstate(*values(temp_obj, QU.add_bookmark_obj))

View file

@ -415,7 +415,7 @@ class Player(xbmc.Player):
item['Server']['api'].close_transcode(item['DeviceId'])
path = xbmc.translatePath("special://profile/addon_data/plugin.video.emby/temp/").decode('utf-8')
path = xbmc.translatePath("special://profile/addon_data/plugin.video.jellyfin/temp/").decode('utf-8')
if xbmcvfs.exists(path):
dirs, files = xbmcvfs.listdir(path)

View file

@ -359,7 +359,7 @@ class Views(object):
else:
element = etree.Element('node', {'order': str(index), 'type': "folder"})
etree.SubElement(element, 'icon').text = "special://home/addons/plugin.video.emby/icon.png"
etree.SubElement(element, 'icon').text = "special://home/addons/plugin.video.jellyfin/icon.png"
return element
@ -877,7 +877,7 @@ class Views(object):
'mode': "nextepisodes",
'limit': self.limit
}
return "%s?%s" % ("plugin://plugin.video.emby/", urllib.urlencode(params))
return "%s?%s" % ("plugin://plugin.video.jellyfin/", urllib.urlencode(params))
def window_browse(self, view, node=None):
@ -892,7 +892,7 @@ class Views(object):
if node:
params['folder'] = node
return "%s?%s" % ("plugin://plugin.video.emby/", urllib.urlencode(params))
return "%s?%s" % ("plugin://plugin.video.jellyfin/", urllib.urlencode(params))
def window_clear(self, name=None):

View file

@ -126,7 +126,7 @@ class requestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
xbmc.log("[ webservice ] path: %s params: %s" % (str(self.path), str(params)), xbmc.LOGWARNING)
path = ("plugin://plugin.video.emby?mode=play&id=%s&dbid=%s&filename=%s&transcode=%s"
path = ("plugin://plugin.video.jellyfin?mode=play&id=%s&dbid=%s&filename=%s&transcode=%s"
% (params.get('Id'), params.get('KodiId'), params.get('Name'), params.get('transcode') or False))
self.send_response(200)