Fix audio and subtitle selection

This commit is contained in:
AeonLucid 2022-01-16 01:26:23 +01:00
parent 0dafe546e8
commit dfbc48d3d9
1 changed files with 2 additions and 2 deletions

View File

@ -170,12 +170,12 @@ export default {
GET_AUDIO_STREAM_ID: (state, getters) => {
const selectedAudioStream = getters.GET_DECISION_STREAMS
.find((stream) => stream.streamType === '2' && stream.selected === '1');
.find((stream) => stream.streamType === 2 && stream.selected);
return selectedAudioStream ? parseInt(selectedAudioStream.id, 10) : 0;
},
GET_SUBTITLE_STREAM: (state, getters) => getters.GET_DECISION_STREAMS
.find((stream) => stream.streamType === '3' && stream.selected === '1'),
.find((stream) => stream.streamType === 3 && stream.selected),
GET_SUBTITLE_STREAM_ID: (state, getters) => (getters.GET_SUBTITLE_STREAM
? parseInt(getters.GET_SUBTITLE_STREAM.id, 10)