mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix some bugs reported by sonarCloud
This commit is contained in:
parent
92b1cb3aa3
commit
03a6269b5f
3 changed files with 7 additions and 9 deletions
|
@ -249,11 +249,9 @@ import confirm from '../confirm/confirm';
|
|||
dispatchNeedsRefresh();
|
||||
break;
|
||||
case 'playlist':
|
||||
import('../playlisteditor/playlisteditor').then((playlistEditor) => {
|
||||
new playlistEditor({
|
||||
items: items,
|
||||
serverId: serverId
|
||||
});
|
||||
new playlistEditor({
|
||||
items: items,
|
||||
serverId: serverId
|
||||
});
|
||||
hideSelections();
|
||||
dispatchNeedsRefresh();
|
||||
|
|
|
@ -3126,7 +3126,7 @@ class PlaybackManager {
|
|||
}
|
||||
});
|
||||
|
||||
pluginManager.ofType('mediaplayer').map(initMediaPlayer);
|
||||
pluginManager.ofType('mediaplayer').forEach(initMediaPlayer);
|
||||
|
||||
function sendProgressUpdate(player, progressEventName, reportPlaylist) {
|
||||
if (!player) {
|
||||
|
|
|
@ -33,18 +33,18 @@ function showQualityMenu(player, btn) {
|
|||
return opt;
|
||||
});
|
||||
|
||||
let selectedId = options.filter(function (o) {
|
||||
const selectedId = options.filter(function (o) {
|
||||
return o.selected;
|
||||
});
|
||||
|
||||
selectedId = selectedId.length ? selectedId[0].bitrate : null;
|
||||
const selectedBitrate = selectedId.length ? selectedId[0].bitrate : null;
|
||||
|
||||
return actionsheet.show({
|
||||
items: menuItems,
|
||||
positionTo: btn
|
||||
}).then(function (id) {
|
||||
const bitrate = parseInt(id);
|
||||
if (bitrate !== selectedId) {
|
||||
if (bitrate !== selectedBitrate) {
|
||||
playbackManager.setMaxStreamingBitrate({
|
||||
enableAutomaticBitrateDetection: bitrate ? false : true,
|
||||
maxBitrate: bitrate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue