1
0
Fork 0
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:
vitorsemeano 2020-11-06 00:18:43 +00:00
parent 92b1cb3aa3
commit 03a6269b5f
3 changed files with 7 additions and 9 deletions

View file

@ -249,12 +249,10 @@ import confirm from '../confirm/confirm';
dispatchNeedsRefresh();
break;
case 'playlist':
import('../playlisteditor/playlisteditor').then((playlistEditor) => {
new playlistEditor({
items: items,
serverId: serverId
});
});
hideSelections();
dispatchNeedsRefresh();
break;

View file

@ -3126,7 +3126,7 @@ class PlaybackManager {
}
});
pluginManager.ofType('mediaplayer').map(initMediaPlayer);
pluginManager.ofType('mediaplayer').forEach(initMediaPlayer);
function sendProgressUpdate(player, progressEventName, reportPlaylist) {
if (!player) {

View file

@ -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