playutils: Lint changes

Signed-off-by: Michal Chvíla <michal@chvila.sk>
This commit is contained in:
Michal Chvíla 2025-05-04 22:59:32 +02:00
commit 2a4b4501b7

View file

@ -686,7 +686,10 @@ class PlayUtils(object):
if subtitle is not None: if subtitle is not None:
subtitle_selected_index = subtitle subtitle_selected_index = subtitle
elif skip_dialog in (Transcode.Enabled, Transcode.Subtitle) and subs_stream_indexes: elif (
skip_dialog in (Transcode.Enabled, Transcode.Subtitle)
and subs_stream_indexes
):
selection = list(["No subtitles"]) + list( selection = list(["No subtitles"]) + list(
map(get_track_title, subs_stream_indexes) map(get_track_title, subs_stream_indexes)
) )
@ -702,9 +705,8 @@ class PlayUtils(object):
server_settings = self.api_client.get_transcode_settings() server_settings = self.api_client.get_transcode_settings()
stream = streams[subtitle_selected_index] stream = streams[subtitle_selected_index]
if ( if stream["SupportsExternalStream"] and (
stream["SupportsExternalStream"] stream["IsExternal"] or server_settings["EnableSubtitleExtraction"]
and (stream['IsExternal'] or server_settings["EnableSubtitleExtraction"])
): ):
self.info["SubtitleUrl"] = self.get_subtitles( self.info["SubtitleUrl"] = self.get_subtitles(
source, stream, subtitle_selected_index source, stream, subtitle_selected_index