Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
don't query plex item twice in case of movies
Browse files Browse the repository at this point in the history
  • Loading branch information
pannal committed May 21, 2017
1 parent e2756e8 commit 89b4305
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Contents/Code/support/plex_media.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 89b4305

Please sign in to comment.