mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Merge pull request #69 from TrueTechy/master
Complete __shortcuts__ and __getitem__ cleanup
This commit is contained in:
commit
d93580d7db
5 changed files with 1 additions and 56 deletions
|
@ -110,11 +110,6 @@ class Jellyfin(object):
|
|||
def __getattr__(self, 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):
|
||||
|
||||
self.client[self.server_id] = JellyfinClient()
|
||||
|
|
|
@ -34,18 +34,6 @@ class Movies(KodiDb):
|
|||
|
||||
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()
|
||||
@jellyfin_item()
|
||||
@library_check()
|
||||
|
|
|
@ -34,20 +34,6 @@ class Music(KodiDb):
|
|||
|
||||
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()
|
||||
@jellyfin_item()
|
||||
@library_check()
|
||||
|
|
|
@ -34,16 +34,6 @@ class MusicVideos(KodiDb):
|
|||
|
||||
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()
|
||||
@jellyfin_item()
|
||||
@library_check()
|
||||
|
|
|
@ -37,20 +37,6 @@ class TVShows(KodiDb):
|
|||
|
||||
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()
|
||||
@jellyfin_item()
|
||||
@library_check()
|
||||
|
|
Loading…
Reference in a new issue