Plex: Fix guid lookup in find_video and get_video_status

pull/138/head
Somer Hayter 2024-01-13 00:10:34 +11:00
parent 95f2a9ad30
commit 59b49fd0df
1 changed files with 5 additions and 5 deletions

View File

@ -199,9 +199,9 @@ def find_video(plex_search, video_ids, videos=None):
if videos:
for show, seasons in videos.items():
show = {k: v for k, v in show}
if guid_source in show["ids"].keys():
if guid_id in show["ids"][guid_source]:
for season in seasons:
if guid_source in show.keys():
if guid_id == show[guid_source]:
for season in seasons.values():
for episode in season:
episode_videos.append(episode)
@ -234,8 +234,8 @@ def get_video_status(plex_search, video_ids, videos):
if guid_source in video_ids.keys():
if guid_id in video_ids[guid_source]:
for video in videos:
if guid_source in video["ids"].keys():
if guid_id in video["ids"][guid_source]:
if guid_source in video.keys():
if guid_id == video[guid_source]:
return video["status"]
return None