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:
parent
5a217ca084
commit
2a1ff26ad9
1 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue