From d0d6798bb1ee66ab141037a4966d0292367f22c4 Mon Sep 17 00:00:00 2001 From: croneter Date: Sat, 3 Nov 2018 10:39:49 +0100 Subject: [PATCH] Simplify code --- resources/lib/plex_db/common.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/resources/lib/plex_db/common.py b/resources/lib/plex_db/common.py index 4d1e9789..f3f38898 100644 --- a/resources/lib/plex_db/common.py +++ b/resources/lib/plex_db/common.py @@ -47,20 +47,16 @@ class PlexDBBase(object): answ = None if plex_type == v.PLEX_TYPE_MOVIE: entry = self.movie(plex_id) - if entry: - answ = self.entry_to_movie(entry) + answ = self.entry_to_movie(entry) elif plex_type == v.PLEX_TYPE_EPISODE: entry = self.episode(plex_id) - if entry: - answ = self.entry_to_episode(entry) + answ = self.entry_to_episode(entry) elif plex_type == v.PLEX_TYPE_SHOW: entry = self.show(plex_id) - if entry: - answ = self.entry_to_show(entry) + answ = self.entry_to_show(entry) elif plex_type == v.PLEX_TYPE_SEASON: entry = self.season(plex_id) - if entry: - answ = self.entry_to_season(entry) + answ = self.entry_to_season(entry) else: # SLOW - lookup plex_id in all our tables for kind in (v.PLEX_TYPE_MOVIE,