fix some bugs reported by sonarCloud
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user