1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

clean up code

Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com>
This commit is contained in:
Ivan Schurawel 2023-02-09 19:40:28 -05:00
parent 5a217ca084
commit 2a1ff26ad9

View file

@ -1490,18 +1490,18 @@ class PlaybackManager {
self.getSecondarySubtitleStreamIndex = function (player) {
player = player || self._currentPlayer;
if (!player) {
throw new Error('player cannot be null');
}
try {
if (player && !enableLocalPlaylistManagement(player)) {
if (!enableLocalPlaylistManagement(player)) {
return player.getSecondarySubtitleStreamIndex();
}
} catch (e) {
console.error('[playbackmanager] Failed to get secondary stream index:', e);
}
if (!player) {
throw new Error('player cannot be null');
}
return getPlayerData(player).secondarySubtitleStreamIndex;
};