mirror of
https://github.com/movie-web/movie-web.git
synced 2024-12-24 18:51:53 +01:00
fix episode subtitles
This commit is contained in:
parent
150b8de8e8
commit
8ef38b151b
@ -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, {
|
||||
|
@ -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);
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user