mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 17:15:48 +00:00
check if embedded subtitles in stream are valid
This commit is contained in:
parent
df0464aad2
commit
d3c3ee47e5
1 changed files with 12 additions and 13 deletions
|
|
@ -189,19 +189,18 @@ const Player = ({ urlParams }) => {
|
|||
0
|
||||
}
|
||||
});
|
||||
dispatch({
|
||||
commandName: 'addSubtitlesTracks',
|
||||
commandArgs: {
|
||||
tracks: player.selected.stream.subtitles.map(({ url, lang }) => ({
|
||||
url,
|
||||
lang,
|
||||
origin: player.selected.stream.addon !== null ?
|
||||
player.selected.stream.addon.manifest.name
|
||||
:
|
||||
'EMBEDDED IN STREAM'
|
||||
}))
|
||||
}
|
||||
});
|
||||
if (Array.isArray(player.selected.stream.subtitles)) {
|
||||
dispatch({
|
||||
commandName: 'addSubtitlesTracks',
|
||||
commandArgs: {
|
||||
tracks: player.selected.stream.subtitles.map(({ url, lang }) => ({
|
||||
url,
|
||||
lang,
|
||||
origin: 'EMBEDDED IN STREAM'
|
||||
}))
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}, [player.selected]);
|
||||
useDeepEqualEffect(() => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue