Plex: Fix guid lookup in find_video and get_video_status

This commit is contained in:
Somer Hayter
2024-01-13 00:10:34 +11:00
parent 95f2a9ad30
commit 59b49fd0df

View File

@@ -199,9 +199,9 @@ def find_video(plex_search, video_ids, videos=None):
if videos: if videos:
for show, seasons in videos.items(): for show, seasons in videos.items():
show = {k: v for k, v in show} show = {k: v for k, v in show}
if guid_source in show["ids"].keys(): if guid_source in show.keys():
if guid_id in show["ids"][guid_source]: if guid_id == show[guid_source]:
for season in seasons: for season in seasons.values():
for episode in season: for episode in season:
episode_videos.append(episode) 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_source in video_ids.keys():
if guid_id in video_ids[guid_source]: if guid_id in video_ids[guid_source]:
for video in videos: for video in videos:
if guid_source in video["ids"].keys(): if guid_source in video.keys():
if guid_id in video["ids"][guid_source]: if guid_id == video[guid_source]:
return video["status"] return video["status"]
return None return None