Remove all emby api endpoints

This commit is contained in:
mcarlton00 2019-12-14 08:19:57 -05:00
parent 58c9db9944
commit a7c96577cd
7 changed files with 19 additions and 19 deletions

View file

@ -97,4 +97,4 @@ class UsersConnect(xbmcgui.WindowXMLDialog):
def _get_user_artwork(self, user_id, item_type): def _get_user_artwork(self, user_id, item_type):
# Load user information set by UserClient # Load user information set by UserClient
return "%s/emby/Users/%s/Images/%s?Format=original" % (self.server, user_id, item_type) return "%s/Users/%s/Images/%s?Format=original" % (self.server, user_id, item_type)

View file

@ -28,7 +28,7 @@ def get_jellyfinserver_url(handler):
handler = handler[1:] handler = handler[1:]
LOG.info("handler starts with /: %s", handler) LOG.info("handler starts with /: %s", handler)
return "{server}/emby/%s" % handler return "{server}/%s" % handler
def browse_info(): def browse_info():

View file

@ -228,7 +228,7 @@ class API(object):
''' Get jellyfin user profile picture. ''' Get jellyfin user profile picture.
''' '''
return "%s/emby/Users/%s/Images/Primary?Format=original" % (self.server, user_id) return "%s/Users/%s/Images/Primary?Format=original" % (self.server, user_id)
def get_people_artwork(self, people): def get_people_artwork(self, people):
@ -306,7 +306,7 @@ class API(object):
for index, tag in enumerate(tags): for index, tag in enumerate(tags):
artwork = "%s/emby/Items/%s/Images/Backdrop/%s?Format=original&Tag=%s%s" % (self.server, item_id, index, tag, (query or "")) artwork = "%s/Items/%s/Images/Backdrop/%s?Format=original&Tag=%s%s" % (self.server, item_id, index, tag, (query or ""))
backdrops.append(artwork) backdrops.append(artwork)
return backdrops return backdrops
@ -318,7 +318,7 @@ class API(object):
if item_id is None: if item_id is None:
return "" return ""
url = "%s/emby/Items/%s/Images/%s/0?Format=original" % (self.server, item_id, image) url = "%s/Items/%s/Images/%s/0?Format=original" % (self.server, item_id, image)
if tag is not None: if tag is not None:
url += "&Tag=%s" % tag url += "&Tag=%s" % tag

View file

@ -254,10 +254,10 @@ class PlayUtils(object):
video_type = 'live' if source['Protocol'] == 'LiveTV' else 'master' video_type = 'live' if source['Protocol'] == 'LiveTV' else 'master'
base = base.replace('stream' if 'stream' in base else 'master', video_type, 1) base = base.replace('stream' if 'stream' in base else 'master', video_type, 1)
self.info['Path'] = "%s/emby%s?%s" % (self.info['ServerAddress'], base, params) self.info['Path'] = "%s/%s?%s" % (self.info['ServerAddress'], base, params)
self.info['Path'] += "&maxWidth=%s&maxHeight=%s" % (self.get_resolution()) self.info['Path'] += "&maxWidth=%s&maxHeight=%s" % (self.get_resolution())
else: else:
self.info['Path'] = "%s/emby%s" % (self.info['ServerAddress'], source['TranscodingUrl']) self.info['Path'] = "%s/%s" % (self.info['ServerAddress'], source['TranscodingUrl'])
return self.info['Path'] return self.info['Path']
@ -274,14 +274,14 @@ class PlayUtils(object):
self.info['Method'] = "DirectStream" self.info['Method'] = "DirectStream"
if self.item['Type'] == "Audio": if self.item['Type'] == "Audio":
self.info['Path'] = "%s/emby/Audio/%s/stream.%s?static=true&api_key=%s" % ( self.info['Path'] = "%s/Audio/%s/stream.%s?static=true&api_key=%s" % (
self.info['ServerAddress'], self.info['ServerAddress'],
self.item['Id'], self.item['Id'],
source.get('Container', "mp4").split(',')[0], source.get('Container', "mp4").split(',')[0],
self.info['Token'] self.info['Token']
) )
else: else:
self.info['Path'] = "%s/emby/Videos/%s/stream?static=true&MediaSourceId=%s&api_key=%s" % ( self.info['Path'] = "%s/Videos/%s/stream?static=true&MediaSourceId=%s&api_key=%s" % (
self.info['ServerAddress'], self.info['ServerAddress'],
self.item['Id'], self.item['Id'],
source['Id'], source['Id'],
@ -474,7 +474,7 @@ class PlayUtils(object):
index = stream['Index'] index = stream['Index']
if 'DeliveryUrl' in stream and stream['DeliveryUrl'].lower().startswith('/videos'): if 'DeliveryUrl' in stream and stream['DeliveryUrl'].lower().startswith('/videos'):
url = "%s/emby%s" % (self.info['ServerAddress'], stream['DeliveryUrl']) url = "%s/%s" % (self.info['ServerAddress'], stream['DeliveryUrl'])
else: else:
url = self.get_subtitles(source, stream, index) url = self.get_subtitles(source, stream, index)
@ -630,9 +630,9 @@ class PlayUtils(object):
def get_subtitles(self, source, stream, index): def get_subtitles(self, source, stream, index):
if stream['IsTextSubtitleStream'] and 'DeliveryUrl' in stream and stream['DeliveryUrl'].lower().startswith('/videos'): if stream['IsTextSubtitleStream'] and 'DeliveryUrl' in stream and stream['DeliveryUrl'].lower().startswith('/videos'):
url = "%s/emby%s" % (self.info['ServerAddress'], stream['DeliveryUrl']) url = "%s/%s" % (self.info['ServerAddress'], stream['DeliveryUrl'])
else: else:
url = "%s/emby/Videos/%s/%s/Subtitles/%s/Stream.%s?api_key=%s" % ( url = "%s/Videos/%s/%s/Subtitles/%s/Stream.%s?api_key=%s" % (
self.info['ServerAddress'], self.info['ServerAddress'],
self.item['Id'], self.item['Id'],
source['Id'], source['Id'],

View file

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
def jellyfin_url(client, handler): def jellyfin_url(client, handler):
return "%s/emby/%s" % (client.config.data['auth.server'], handler) return "%s/%s" % (client.config.data['auth.server'], handler)
def basic_info(): def basic_info():

View file

@ -183,7 +183,7 @@ class ConnectionManager(object):
return self.client.jellyfin.get_public_users() return self.client.jellyfin.get_public_users()
def get_jellyfin_url(self, base, handler): def get_jellyfin_url(self, base, handler):
return "%s/emby/%s" % (base, handler) return "%s/%s" % (base, handler)
def _request_url(self, request, headers=True): def _request_url(self, request, headers=True):

View file

@ -167,7 +167,7 @@ class HTTP(object):
def _request(self, data): def _request(self, data):
if 'url' not in data: if 'url' not in data:
data['url'] = "%s/emby/%s" % (self.config.data['auth.server'], data.pop('handler', "")) data['url'] = "%s/%s" % (self.config.data['auth.server'], data.pop('handler', ""))
self._get_header(data) self._get_header(data)
data['timeout'] = data.get('timeout') or self.config.data['http.timeout'] data['timeout'] = data.get('timeout') or self.config.data['http.timeout']