check if fedapi unknown is mp4

This commit is contained in:
Pas 2025-05-17 20:14:27 -06:00
parent 53604e7304
commit 6de1e1f63f

View file

@ -150,7 +150,11 @@ function embed(provider: {
const streams = Object.entries(data.streams).reduce((acc: Record<string, string>, [quality, url]) => {
let qualityKey: number;
if (quality === 'ORG') {
acc.unknown = url;
// Only add unknown quality if it's an mp4 (handle URLs with query parameters)
const urlPath = url.split('?')[0]; // Remove query parameters
if (urlPath.toLowerCase().endsWith('.mp4')) {
acc.unknown = url;
}
return acc;
}
if (quality === '4K') {