Skip to content

Commit

Permalink
Merge pull request #332 from Etherna/fix/EDD-411-importer-sources
Browse files Browse the repository at this point in the history
fix sources loading when encoded using the importer
  • Loading branch information
mattiaz9 authored Aug 24, 2024
2 parents a4813ed + e13e9ba commit 29e11be
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/stores/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 29e11be

Please # to comment.