fix episode subtitles

This commit is contained in:
James Hawkins 2021-10-22 10:50:01 +01:00
parent 150b8de8e8
commit 8ef38b151b
2 changed files with 2 additions and 8 deletions

View File

@ -91,12 +91,6 @@ async function getVideoUrl(config) {
};
}
async function getEpisodeSubs (config) {
return await fetch(`${CORS_URL}/api/v1/shows/episode-subtitles/?id_episode=${config.id}`, {
headers: { phpsessid },
}).then(res => res.json());
}
async function getEpisodes(slug) {
const url = `${CORS_URL}/shows/view/${slug}`;
const pageReq = await fetch(url, {

View File

@ -57,9 +57,9 @@ export function MovieView(props) {
setLoading(true);
getStreamUrl(streamData.slug, streamData.type, streamData.source, season, episode)
.then(({ url }) => {
.then(({ url, subtitles }) => {
if (cancel) return;
streamData.subtitles = [];
streamData.subtitles = subtitles;
setStreamUrl(url)
setLoading(false);
})