fix: default subtitle not being selected properly
This commit is contained in:
3 files changed
+7
-3
No files matched your search
@@ -197,7 +197,9 @@ const EpisodeTitlePage = () => {
|
|||||||
item.data.MediaSources[0].DefaultAudioStreamIndex ?? null,
|
item.data.MediaSources[0].DefaultAudioStreamIndex ?? null,
|
||||||
);
|
);
|
||||||
setSelectedSubtitleTrack(
|
setSelectedSubtitleTrack(
|
||||||
item.data.MediaSources[0].DefaultSubtitleStreamIndex ?? "nosub",
|
item.data.MediaSources[0].DefaultSubtitleStreamIndex === -1
|
||||||
|
? "nosub"
|
||||||
|
: item.data.MediaSources[0].DefaultSubtitleStreamIndex,
|
||||||
);
|
);
|
||||||
|
|
||||||
setVideoTracks(videos);
|
setVideoTracks(videos);
|
||||||
|
|||||||
@@ -230,7 +230,9 @@ const ItemDetail = () => {
|
|||||||
item.data.MediaSources[0].DefaultAudioStreamIndex ?? null,
|
item.data.MediaSources[0].DefaultAudioStreamIndex ?? null,
|
||||||
);
|
);
|
||||||
setSelectedSubtitleTrack(
|
setSelectedSubtitleTrack(
|
||||||
item.data.MediaSources[0].DefaultSubtitleStreamIndex ?? "nosub",
|
item.data.MediaSources[0].DefaultSubtitleStreamIndex === -1
|
||||||
|
? "nosub"
|
||||||
|
: item.data.MediaSources[0].DefaultSubtitleStreamIndex,
|
||||||
);
|
);
|
||||||
|
|
||||||
setVideoTracks(videos);
|
setVideoTracks(videos);
|
||||||
|
|||||||
@@ -430,7 +430,7 @@ const SearchPage = () => {
|
|||||||
book.data.Items.length === 0 &&
|
book.data.Items.length === 0 &&
|
||||||
musicArtists.data.Items.length === 0 &&
|
musicArtists.data.Items.length === 0 &&
|
||||||
person.data.Items.length === 0 &&
|
person.data.Items.length === 0 &&
|
||||||
episodes.data.SearchHints.length === 0 && (
|
episodes.data.SearchHints?.length === 0 && (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
height: "calc(100vh - 12em)",
|
height: "calc(100vh - 12em)",
|
||||||
|
|||||||
Reference in new issue
Block a user