mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-05-24 00:41:38 +00:00
Rebrand addon name and id and make it compatible with Jellyfin
This commit is contained in:
parent
32eaecfea1
commit
168bab2b01
37 changed files with 136 additions and 142 deletions
|
@ -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])
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue