From 89b4305ccb8f405cbf897f0055cfa08d4e9b9d39 Mon Sep 17 00:00:00 2001 From: panni Date: Mon, 22 May 2017 01:26:26 +0200 Subject: [PATCH] don't query plex item twice in case of movies --- Contents/Code/support/plex_media.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Contents/Code/support/plex_media.py b/Contents/Code/support/plex_media.py index c32a91d64..a4cab636d 100644 --- a/Contents/Code/support/plex_media.py +++ b/Contents/Code/support/plex_media.py @@ -34,9 +34,9 @@ def media_to_videos(media, kind="series"): """ videos = [] - item = get_item(media.id) - year = item.year - original_title = item.title_original + plex_item = get_item(media.id) + year = plex_item.year + original_title = plex_item.title_original if kind == "series": for season in media.seasons: @@ -67,7 +67,6 @@ def media_to_videos(media, kind="series"): }) ) else: - plex_item = get_item(media.id) imdb_id = None if imdb_guid_identifier in media.guid: imdb_id = media.guid[len(imdb_guid_identifier):].split("?")[0]