Fix subtitles videasy
This commit is contained in:
+6
-8
@@ -231,13 +231,12 @@ async function extractStreamUrl(ID) {
|
|||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const englishSubtitle = subtitles.find(
|
const englishSubtitle = subtitles.find(sub => (sub.language || sub.lang)?.toLowerCase() === 'english');
|
||||||
sub => sub.language.toLowerCase().includes('english')
|
const subtitleUrl = englishSubtitle ? englishSubtitle.url : "";
|
||||||
)?.url || null;
|
|
||||||
|
|
||||||
return JSON.stringify({
|
return JSON.stringify({
|
||||||
streams: streamObjects,
|
streams: streamObjects,
|
||||||
subtitle: englishSubtitle
|
subtitles: subtitleUrl
|
||||||
});
|
});
|
||||||
} else if (ID.includes('tv')) {
|
} else if (ID.includes('tv')) {
|
||||||
const parts = ID.split('/');
|
const parts = ID.split('/');
|
||||||
@@ -290,13 +289,12 @@ async function extractStreamUrl(ID) {
|
|||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const englishSubtitle = subtitles.find(
|
const englishSubtitle = subtitles.find(sub => (sub.language || sub.lang)?.toLowerCase() === 'english');
|
||||||
sub => sub.language.toLowerCase().includes('english')
|
const subtitleUrl = englishSubtitle ? englishSubtitle.url : "";
|
||||||
)?.url || null;
|
|
||||||
|
|
||||||
return JSON.stringify({
|
return JSON.stringify({
|
||||||
streams: streamObjects,
|
streams: streamObjects,
|
||||||
subtitle: englishSubtitle
|
subtitles: subtitleUrl
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"name": "50/50",
|
"name": "50/50",
|
||||||
"icon": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ3122kQwublLkZ6rf1fEpUP79BxZOFmH9BSA&s"
|
"icon": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ3122kQwublLkZ6rf1fEpUP79BxZOFmH9BSA&s"
|
||||||
},
|
},
|
||||||
"version": "1.1.1",
|
"version": "1.1.2",
|
||||||
"language": "English",
|
"language": "English",
|
||||||
"streamType": "HLS",
|
"streamType": "HLS",
|
||||||
"quality": "4K",
|
"quality": "4K",
|
||||||
|
|||||||
Reference in New Issue
Block a user