mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-21 07:32:02 +00:00
Merge pull request #1167 from schobiDotDev/fix/subtitle-addon-label
Some checks are pending
Build / build (push) Waiting to run
Some checks are pending
Build / build (push) Waiting to run
fix: use addon-provided subtitle label instead of URL
This commit is contained in:
commit
effa6e430e
1 changed files with 2 additions and 2 deletions
|
|
@ -369,7 +369,7 @@ const Player = ({ urlParams, queryParams }) => {
|
||||||
subtitles: Array.isArray(player.selected.stream.subtitles) ?
|
subtitles: Array.isArray(player.selected.stream.subtitles) ?
|
||||||
player.selected.stream.subtitles.map((subtitles) => ({
|
player.selected.stream.subtitles.map((subtitles) => ({
|
||||||
...subtitles,
|
...subtitles,
|
||||||
label: subtitles.url
|
label: subtitles.label || subtitles.url
|
||||||
}))
|
}))
|
||||||
:
|
:
|
||||||
[]
|
[]
|
||||||
|
|
@ -406,7 +406,7 @@ const Player = ({ urlParams, queryParams }) => {
|
||||||
if (video.state.stream !== null) {
|
if (video.state.stream !== null) {
|
||||||
const tracks = player.subtitles.map((subtitles) => ({
|
const tracks = player.subtitles.map((subtitles) => ({
|
||||||
...subtitles,
|
...subtitles,
|
||||||
label: subtitles.url
|
label: subtitles.label || subtitles.url
|
||||||
}));
|
}));
|
||||||
video.addExtraSubtitlesTracks(tracks);
|
video.addExtraSubtitlesTracks(tracks);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue