From e13e9ba1d6cafa8e2bc185c716591cc19d42f6fb Mon Sep 17 00:00:00 2001 From: Mattia Dalzocchio Date: Sat, 24 Aug 2024 09:31:29 +0200 Subject: [PATCH] fix sources loading when encoded using the importer --- src/stores/player.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/stores/player.ts b/src/stores/player.ts index 2653de7e..fc84cc98 100644 --- a/src/stores/player.ts +++ b/src/stores/player.ts @@ -173,8 +173,11 @@ const actions = (set: SetFunc, get: GetFunc) => ({ set(state => { const getAdaptiveSourceQuality = (source: VideoSource & { type: "hls" | "dash" }) => { if (source.path.match(/audio\.(mpd|m3u8)$/)) return "Audio" + if (source.path.match(/audio\/playlist\.(mpd|m3u8)$/)) return "Audio" if (source.path.match(/[0-9]{3,}p\.(mpd|m3u8)$/)) return source.path.match(/([0-9]{3,}p)\.(mpd|m3u8)$/)![1] as VideoQuality + if (source.path.match(/[0-9]{3,}p\/playlist\.(mpd|m3u8)$/)) + return source.path.match(/([0-9]{3,}p)\/playlist\.(mpd|m3u8)$/)![1] as VideoQuality return "Auto" } const preferredQuality = state.currentQuality