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

fixed some code smells

fix config.json plugins path
This commit is contained in:
vitorsemeano 2020-10-22 00:36:38 +01:00
parent 327462321c
commit 6638c13e85
8 changed files with 41 additions and 39 deletions

View file

@ -126,14 +126,12 @@ export function alert(options) {
}
export function capabilities(appHost) {
let capabilities = {
return Object.assign({
PlayableMediaTypes: ['Audio', 'Video'],
SupportedCommands: ['MoveUp', 'MoveDown', 'MoveLeft', 'MoveRight', 'PageUp', 'PageDown', 'PreviousLetter', 'NextLetter', 'ToggleOsd', 'ToggleContextMenu', 'Select', 'Back', 'SendKey', 'SendString', 'GoHome', 'GoToSettings', 'VolumeUp', 'VolumeDown', 'Mute', 'Unmute', 'ToggleMute', 'SetVolume', 'SetAudioStreamIndex', 'SetSubtitleStreamIndex', 'DisplayContent', 'GoToSearch', 'DisplayMessage', 'SetRepeatMode', 'SetShuffleQueue', 'ChannelUp', 'ChannelDown', 'PlayMediaSource', 'PlayTrailers'],
SupportsPersistentIdentifier: window.appMode === 'cordova' || window.appMode === 'android',
SupportsMediaControl: true
};
appHost.getPushTokenInfo();
return capabilities = Object.assign(capabilities, appHost.getPushTokenInfo());
}, appHost.getPushTokenInfo());
}
export function selectServer() {

View file

@ -7,7 +7,7 @@ import { appRouter } from '../components/appRouter';
import { appHost } from '../components/apphost';
import { playbackManager } from '../components/playback/playbackmanager';
import syncPlayManager from '../components/syncPlay/syncPlayManager';
import groupSelectionMenu from '../components/syncPlay/groupSelectionMenu';
import { show as groupSelectionMenuShow } from '../components/syncPlay/groupSelectionMenu';
import browser from './browser';
import globalize from './globalize';
import imageHelper from './imagehelper';
@ -229,7 +229,7 @@ import ServerConnections from '../components/ServerConnections';
function onSyncButtonClicked() {
const btn = this;
groupSelectionMenu.show(btn);
groupSelectionMenuShow(btn);
}
function onSyncPlayEnabled(event, enabled) {
@ -814,9 +814,9 @@ import ServerConnections from '../components/ServerConnections';
if (user) {
Promise.resolve(user);
} else {
ServerConnections.user(getCurrentApiClient()).then(function (user) {
refreshLibraryInfoInDrawer(user);
updateLibraryMenu(user.localUser);
ServerConnections.user(getCurrentApiClient()).then(function (userResult) {
refreshLibraryInfoInDrawer(userResult);
updateLibraryMenu(userResult.localUser);
});
}
}
@ -990,9 +990,9 @@ import ServerConnections from '../components/ServerConnections';
loadNavDrawer();
ServerConnections.user(currentApiClient).then(function (user) {
currentUser = user;
updateUserInHeader(user);
ServerConnections.user(currentApiClient).then(function (userResult) {
currentUser = userResult;
updateUserInHeader(userResult);
});
});

View file

@ -112,7 +112,7 @@ function init() {
function onGlobalizeInit() {
if (window.appMode === 'android') {
if (window.location.href.toString().toLowerCase().indexOf('start=backgroundsync') !== -1) {
return onAppReady(browser);
return onAppReady();
}
}
@ -128,12 +128,12 @@ function onGlobalizeInit() {
import('../assets/css/librarybrowser.css');
loadPlugins(appHost, browser).then(function () {
onAppReady(browser);
loadPlugins().then(function () {
onAppReady();
});
}
function loadPlugins(appHost, browser, shell) {
function loadPlugins() {
console.groupCollapsed('loading installed plugins');
console.dir(pluginManager);
return getPlugins().then(function (list) {
@ -167,7 +167,7 @@ function loadPlugins(appHost, browser, shell) {
});
}
function onAppReady(browser) {
function onAppReady() {
console.debug('begin onAppReady');
console.debug('onAppReady: loading dependencies');