mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-11-11 02:46:34 +00:00
Fix conflicts for merge
This commit is contained in:
commit
1e92e92888
6 changed files with 8 additions and 55 deletions
|
|
@ -110,11 +110,6 @@ class Jellyfin(object):
|
||||||
def __getattr__(self, name):
|
def __getattr__(self, name):
|
||||||
return getattr(self.client[self.server_id], name)
|
return getattr(self.client[self.server_id], name)
|
||||||
|
|
||||||
@ensure_client()
|
|
||||||
def __getitem__(self, key):
|
|
||||||
LOG.debug("__getitem__(%r)", key)
|
|
||||||
return self.client[self.server_id][key]
|
|
||||||
|
|
||||||
def construct(self):
|
def construct(self):
|
||||||
|
|
||||||
self.client[self.server_id] = JellyfinClient()
|
self.client[self.server_id] = JellyfinClient()
|
||||||
|
|
|
||||||
|
|
@ -122,11 +122,19 @@ class HTTP(object):
|
||||||
if r.status_code == 401:
|
if r.status_code == 401:
|
||||||
|
|
||||||
if 'X-Application-Error-Code' in r.headers:
|
if 'X-Application-Error-Code' in r.headers:
|
||||||
|
<<<<<<< HEAD
|
||||||
self.client.callback("AccessRestricted", {'ServerId': self.config.data['auth.server-id']})
|
self.client.callback("AccessRestricted", {'ServerId': self.config.data['auth.server-id']})
|
||||||
|
|
||||||
raise HTTPException("AccessRestricted", error)
|
raise HTTPException("AccessRestricted", error)
|
||||||
else:
|
else:
|
||||||
self.client.callback("Unauthorized", {'ServerId': self.config.data['auth.server-id']})
|
self.client.callback("Unauthorized", {'ServerId': self.config.data['auth.server-id']})
|
||||||
|
=======
|
||||||
|
self.client['callback']("AccessRestricted", {'ServerId': self.config.data['auth.server-id']})
|
||||||
|
|
||||||
|
raise HTTPException("AccessRestricted", error)
|
||||||
|
else:
|
||||||
|
self.client['callback']("Unauthorized", {'ServerId': self.config.data['auth.server-id']})
|
||||||
|
>>>>>>> 8268ec3f44657ec4dc448a8a02bbb51841972be9
|
||||||
self.client.auth.revoke_token()
|
self.client.auth.revoke_token()
|
||||||
|
|
||||||
raise HTTPException("Unauthorized", error)
|
raise HTTPException("Unauthorized", error)
|
||||||
|
|
|
||||||
|
|
@ -34,18 +34,6 @@ class Movies(KodiDb):
|
||||||
|
|
||||||
KodiDb.__init__(self, videodb.cursor)
|
KodiDb.__init__(self, videodb.cursor)
|
||||||
|
|
||||||
def __getitem__(self, key):
|
|
||||||
LOG.debug("__getitem__(%r)", key)
|
|
||||||
|
|
||||||
if key == 'Movie':
|
|
||||||
return self.movie
|
|
||||||
elif key == 'BoxSet':
|
|
||||||
return self.boxset
|
|
||||||
elif key == 'UserData':
|
|
||||||
return self.userdata
|
|
||||||
elif key in 'Removed':
|
|
||||||
return self.remove
|
|
||||||
|
|
||||||
@stop()
|
@stop()
|
||||||
@jellyfin_item()
|
@jellyfin_item()
|
||||||
@library_check()
|
@library_check()
|
||||||
|
|
|
||||||
|
|
@ -34,20 +34,6 @@ class Music(KodiDb):
|
||||||
|
|
||||||
KodiDb.__init__(self, musicdb.cursor)
|
KodiDb.__init__(self, musicdb.cursor)
|
||||||
|
|
||||||
def __getitem__(self, key):
|
|
||||||
LOG.debug("__getitem__(%r)", key)
|
|
||||||
|
|
||||||
if key in ('MusicArtist', 'AlbumArtist'):
|
|
||||||
return self.artist
|
|
||||||
elif key == 'MusicAlbum':
|
|
||||||
return self.album
|
|
||||||
elif key == 'Audio':
|
|
||||||
return self.song
|
|
||||||
elif key == 'UserData':
|
|
||||||
return self.userdata
|
|
||||||
elif key in 'Removed':
|
|
||||||
return self.remove
|
|
||||||
|
|
||||||
@stop()
|
@stop()
|
||||||
@jellyfin_item()
|
@jellyfin_item()
|
||||||
@library_check()
|
@library_check()
|
||||||
|
|
|
||||||
|
|
@ -34,16 +34,6 @@ class MusicVideos(KodiDb):
|
||||||
|
|
||||||
KodiDb.__init__(self, videodb.cursor)
|
KodiDb.__init__(self, videodb.cursor)
|
||||||
|
|
||||||
def __getitem__(self, key):
|
|
||||||
LOG.debug("__getitem__(%r)", key)
|
|
||||||
|
|
||||||
if key == 'MusicVideo':
|
|
||||||
return self.musicvideo
|
|
||||||
elif key == 'UserData':
|
|
||||||
return self.userdata
|
|
||||||
elif key in 'Removed':
|
|
||||||
return self.remove
|
|
||||||
|
|
||||||
@stop()
|
@stop()
|
||||||
@jellyfin_item()
|
@jellyfin_item()
|
||||||
@library_check()
|
@library_check()
|
||||||
|
|
|
||||||
|
|
@ -37,20 +37,6 @@ class TVShows(KodiDb):
|
||||||
|
|
||||||
KodiDb.__init__(self, videodb.cursor)
|
KodiDb.__init__(self, videodb.cursor)
|
||||||
|
|
||||||
def __getitem__(self, key):
|
|
||||||
LOG.debug("__getitem__(%r)", key)
|
|
||||||
|
|
||||||
if key == 'Series':
|
|
||||||
return self.tvshow
|
|
||||||
elif key == 'Season':
|
|
||||||
return self.season
|
|
||||||
elif key == 'Episode':
|
|
||||||
return self.episode
|
|
||||||
elif key == 'UserData':
|
|
||||||
return self.userdata
|
|
||||||
elif key in 'Removed':
|
|
||||||
return self.remove
|
|
||||||
|
|
||||||
@stop()
|
@stop()
|
||||||
@jellyfin_item()
|
@jellyfin_item()
|
||||||
@library_check()
|
@library_check()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue