From 789e1856de04d078c3b71f9510b890328ff51d12 Mon Sep 17 00:00:00 2001 From: TrueTechy Date: Mon, 9 Sep 2019 01:52:30 +0100 Subject: [PATCH 1/5] __init__.py - remove __getitem__ --- resources/lib/jellyfin/__init__.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/resources/lib/jellyfin/__init__.py b/resources/lib/jellyfin/__init__.py index 63a493eb..591f2ee7 100644 --- a/resources/lib/jellyfin/__init__.py +++ b/resources/lib/jellyfin/__init__.py @@ -109,12 +109,7 @@ class Jellyfin(object): @ensure_client() 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() From 7ed36ca78aaa79d70244177a2b457b360e6b7145 Mon Sep 17 00:00:00 2001 From: TrueTechy Date: Mon, 9 Sep 2019 01:52:58 +0100 Subject: [PATCH 2/5] movies.py - remove __getitem__ --- resources/lib/objects/movies.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/resources/lib/objects/movies.py b/resources/lib/objects/movies.py index 9734000f..37701d1f 100644 --- a/resources/lib/objects/movies.py +++ b/resources/lib/objects/movies.py @@ -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() From 51ccbfbce0efce44f1db6a175118a9f52de60117 Mon Sep 17 00:00:00 2001 From: TrueTechy Date: Mon, 9 Sep 2019 01:53:27 +0100 Subject: [PATCH 3/5] music.py - remove __getitem__ --- resources/lib/objects/music.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/resources/lib/objects/music.py b/resources/lib/objects/music.py index ebcd7af4..6ab02e86 100644 --- a/resources/lib/objects/music.py +++ b/resources/lib/objects/music.py @@ -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() From 6ac266688af6b5a0f4f67fc6c220dcae7b03ad4e Mon Sep 17 00:00:00 2001 From: TrueTechy Date: Mon, 9 Sep 2019 01:54:46 +0100 Subject: [PATCH 4/5] musicvideos.py - remove __getitem__ --- resources/lib/objects/musicvideos.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/resources/lib/objects/musicvideos.py b/resources/lib/objects/musicvideos.py index ed247a30..dfd0ff4b 100644 --- a/resources/lib/objects/musicvideos.py +++ b/resources/lib/objects/musicvideos.py @@ -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() From d7087808b7db336c2368ea26fc5f1dac8453b276 Mon Sep 17 00:00:00 2001 From: TrueTechy Date: Mon, 9 Sep 2019 01:56:38 +0100 Subject: [PATCH 5/5] tvshows.py - remove __getitem__ --- resources/lib/objects/tvshows.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/resources/lib/objects/tvshows.py b/resources/lib/objects/tvshows.py index ea0b4801..ce6103e5 100644 --- a/resources/lib/objects/tvshows.py +++ b/resources/lib/objects/tvshows.py @@ -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()