From efbe9a4e0f66e7836189125408835dde38dae83d Mon Sep 17 00:00:00 2001 From: jz1 Date: Sat, 23 Mar 2024 10:30:48 +0100 Subject: [PATCH] Reduces unnecery searches with language filters languageCode is not being used, since it checks for the full name language only when it creates a filter. Hence it's now removed to reduce searches. --- modules/plex.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/plex.py b/modules/plex.py index 1e341155..ba7f9ad8 100644 --- a/modules/plex.py +++ b/modules/plex.py @@ -1807,10 +1807,10 @@ class Plex(Library): for part in media.parts: if filter_attr == "audio_language": for a in part.audioStreams(): - attrs.extend([a.language, a.languageCode]) + attrs.extend([a.language]) if filter_attr == "subtitle_language": for s in part.subtitleStreams(): - attrs.extend([s.language, s.languageCode]) + attrs.extend([s.language]) elif filter_attr in ["content_rating", "year", "rating"]: attrs = [getattr(item, filter_actual)] elif filter_attr in ["actor", "country", "director", "genre", "label", "producer", "writer",