mirror of
https://github.com/p-stream/providers.git
synced 2026-05-19 05:22:04 +00:00
check if fedapi unknown is mp4
This commit is contained in:
parent
53604e7304
commit
6de1e1f63f
1 changed files with 5 additions and 1 deletions
|
|
@ -150,7 +150,11 @@ function embed(provider: {
|
||||||
const streams = Object.entries(data.streams).reduce((acc: Record<string, string>, [quality, url]) => {
|
const streams = Object.entries(data.streams).reduce((acc: Record<string, string>, [quality, url]) => {
|
||||||
let qualityKey: number;
|
let qualityKey: number;
|
||||||
if (quality === 'ORG') {
|
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;
|
return acc;
|
||||||
}
|
}
|
||||||
if (quality === '4K') {
|
if (quality === '4K') {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue