mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Remove unused variables
This commit is contained in:
parent
6a60938b09
commit
f60b7686d0
110 changed files with 242 additions and 277 deletions
|
@ -101,8 +101,7 @@ module.exports = {
|
|||
rules: {
|
||||
// TODO: Fix warnings and remove these rules
|
||||
'no-redeclare': ['warn'],
|
||||
'no-useless-escape': ['warn'],
|
||||
'no-unused-vars': ['warn']
|
||||
'no-useless-escape': ['warn']
|
||||
},
|
||||
settings: {
|
||||
polyfills: [
|
||||
|
|
|
@ -54,7 +54,7 @@ import alert from './alert';
|
|||
return html;
|
||||
}
|
||||
|
||||
function renderList(elem, apiClient, result, startIndex, limit) {
|
||||
function renderList(elem, apiClient, result) {
|
||||
elem.innerHTML = result.Items.map(function (i) {
|
||||
return getEntryHtml(i, apiClient);
|
||||
}).join('');
|
||||
|
@ -101,7 +101,7 @@ import alert from './alert';
|
|||
});
|
||||
}
|
||||
|
||||
function onActivityLogUpdate(e, apiClient, data) {
|
||||
function onActivityLogUpdate(e, apiClient) {
|
||||
const options = this.options;
|
||||
|
||||
if (options && options.serverId === apiClient.serverId()) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import './appFooter.scss';
|
||||
|
||||
function render(options) {
|
||||
function render() {
|
||||
const elem = document.createElement('div');
|
||||
elem.classList.add('appfooter');
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import ServerConnections from '../ServerConnections';
|
|||
|
||||
/* eslint-disable indent */
|
||||
|
||||
function enableAnimation(elem) {
|
||||
function enableAnimation() {
|
||||
if (browser.slow) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ import '../../assets/css/scrollstyles.scss';
|
|||
const activeElement = document.activeElement;
|
||||
let removeScrollLockOnClose = false;
|
||||
|
||||
function onHashChange(e) {
|
||||
function onHashChange() {
|
||||
const isBack = self.originalUrl === window.location.href;
|
||||
|
||||
if (isBack || !isOpened(dlg)) {
|
||||
|
@ -200,7 +200,7 @@ import '../../assets/css/scrollstyles.scss';
|
|||
dlg.dialogContainer = dialogContainer;
|
||||
document.body.appendChild(dialogContainer);
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve) => {
|
||||
new DialogHashHandler(dlg, `dlg${new Date().getTime()}`, resolve);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -210,7 +210,7 @@ function loadDynamicFilters(context, options) {
|
|||
}
|
||||
class FilterMenu {
|
||||
show(options) {
|
||||
return new Promise( (resolve, reject) => {
|
||||
return new Promise( (resolve) => {
|
||||
const dialogOptions = {
|
||||
removeOnClose: true,
|
||||
scrollY: false
|
||||
|
|
|
@ -8,7 +8,7 @@ import scrollManager from './scrollManager';
|
|||
scopes.push(elem);
|
||||
}
|
||||
|
||||
function popScope(elem) {
|
||||
function popScope() {
|
||||
if (scopes.length) {
|
||||
scopes.length -= 1;
|
||||
}
|
||||
|
|
|
@ -1057,7 +1057,7 @@ function Guide(options) {
|
|||
}
|
||||
}
|
||||
|
||||
function onSeriesTimerCreated(e, apiClient, data) {
|
||||
function onSeriesTimerCreated() {
|
||||
}
|
||||
|
||||
function onTimerCancelled(e, apiClient, data) {
|
||||
|
@ -1116,7 +1116,7 @@ function Guide(options) {
|
|||
programGrid.classList.add('noRubberBanding');
|
||||
}
|
||||
|
||||
dom.addEventListener(programGrid, 'scroll', function (e) {
|
||||
dom.addEventListener(programGrid, 'scroll', function () {
|
||||
onProgramGridScroll(guideContext, this, timeslotHeaders);
|
||||
}, {
|
||||
passive: true
|
||||
|
|
|
@ -219,7 +219,7 @@ import template from './homeScreenSettings.template.html';
|
|||
context.querySelector('.selectTVHomeScreen').value = userSettings.get('tvhome') || '';
|
||||
}
|
||||
|
||||
function getPerLibrarySettingsHtml(item, user, userSettings, apiClient) {
|
||||
function getPerLibrarySettingsHtml(item, user, userSettings) {
|
||||
let html = '';
|
||||
|
||||
let isChecked;
|
||||
|
|
|
@ -335,7 +335,7 @@ import ServerConnections from '../ServerConnections';
|
|||
}
|
||||
}
|
||||
|
||||
export function loadLibraryTiles(elem, apiClient, user, userSettings, shape, userViews, allSections) {
|
||||
export function loadLibraryTiles(elem, apiClient, user, userSettings, shape, userViews) {
|
||||
let html = '';
|
||||
if (userViews.length) {
|
||||
html += '<h2 class="sectionTitle sectionTitle-cards padded-left">' + globalize.translate('HeaderMyMedia') + '</h2>';
|
||||
|
@ -415,7 +415,7 @@ import ServerConnections from '../ServerConnections';
|
|||
});
|
||||
}
|
||||
|
||||
function loadResumeVideo(elem, apiClient, userId) {
|
||||
function loadResumeVideo(elem, apiClient) {
|
||||
let html = '';
|
||||
|
||||
html += '<h2 class="sectionTitle sectionTitle-cards padded-left">' + globalize.translate('HeaderContinueWatching') + '</h2>';
|
||||
|
@ -488,7 +488,7 @@ import ServerConnections from '../ServerConnections';
|
|||
});
|
||||
}
|
||||
|
||||
function loadResumeAudio(elem, apiClient, userId) {
|
||||
function loadResumeAudio(elem, apiClient) {
|
||||
let html = '';
|
||||
|
||||
html += '<h2 class="sectionTitle sectionTitle-cards padded-left">' + globalize.translate('HeaderContinueListening') + '</h2>';
|
||||
|
@ -688,7 +688,7 @@ import ServerConnections from '../ServerConnections';
|
|||
});
|
||||
}
|
||||
|
||||
function loadNextUp(elem, apiClient, userId) {
|
||||
function loadNextUp(elem, apiClient) {
|
||||
let html = '';
|
||||
|
||||
html += '<div class="sectionTitleContainer sectionTitleContainer-cards padded-left">';
|
||||
|
@ -766,7 +766,7 @@ import ServerConnections from '../ServerConnections';
|
|||
};
|
||||
}
|
||||
|
||||
function loadLatestLiveTvRecordings(elem, activeRecordingsOnly, apiClient, userId) {
|
||||
function loadLatestLiveTvRecordings(elem, activeRecordingsOnly, apiClient) {
|
||||
const title = activeRecordingsOnly ?
|
||||
globalize.translate('HeaderActiveRecordings') :
|
||||
globalize.translate('HeaderLatestRecordings');
|
||||
|
|
|
@ -2,7 +2,7 @@ import { playbackManager } from './playback/playbackmanager';
|
|||
import serverNotifications from '../scripts/serverNotifications';
|
||||
import { Events } from 'jellyfin-apiclient';
|
||||
|
||||
function onUserDataChanged(e, apiClient, userData) {
|
||||
function onUserDataChanged() {
|
||||
const instance = this;
|
||||
|
||||
const eventsToMonitor = getEventsToMonitor(instance);
|
||||
|
@ -25,7 +25,7 @@ function getEventsToMonitor(instance) {
|
|||
return [];
|
||||
}
|
||||
|
||||
function onTimerCreated(e, apiClient, data) {
|
||||
function onTimerCreated() {
|
||||
const instance = this;
|
||||
|
||||
if (getEventsToMonitor(instance).indexOf('timers') !== -1) {
|
||||
|
@ -34,7 +34,7 @@ function onTimerCreated(e, apiClient, data) {
|
|||
}
|
||||
}
|
||||
|
||||
function onSeriesTimerCreated(e, apiClient, data) {
|
||||
function onSeriesTimerCreated() {
|
||||
const instance = this;
|
||||
if (getEventsToMonitor(instance).indexOf('seriestimers') !== -1) {
|
||||
instance.notifyRefreshNeeded();
|
||||
|
@ -42,7 +42,7 @@ function onSeriesTimerCreated(e, apiClient, data) {
|
|||
}
|
||||
}
|
||||
|
||||
function onTimerCancelled(e, apiClient, data) {
|
||||
function onTimerCancelled() {
|
||||
const instance = this;
|
||||
|
||||
if (getEventsToMonitor(instance).indexOf('timers') !== -1) {
|
||||
|
@ -51,7 +51,7 @@ function onTimerCancelled(e, apiClient, data) {
|
|||
}
|
||||
}
|
||||
|
||||
function onSeriesTimerCancelled(e, apiClient, data) {
|
||||
function onSeriesTimerCancelled() {
|
||||
const instance = this;
|
||||
if (getEventsToMonitor(instance).indexOf('seriestimers') !== -1) {
|
||||
instance.notifyRefreshNeeded();
|
||||
|
|
|
@ -163,10 +163,6 @@ import ServerConnections from '../ServerConnections';
|
|||
return html;
|
||||
}
|
||||
|
||||
function getId(item) {
|
||||
return item.Id;
|
||||
}
|
||||
|
||||
export function getListViewHtml(options) {
|
||||
const items = options.items;
|
||||
|
||||
|
@ -183,7 +179,6 @@ import ServerConnections from '../ServerConnections';
|
|||
let outerHtml = '';
|
||||
|
||||
const enableContentWrapper = options.enableOverview && !layoutManager.tv;
|
||||
const containerAlbumArtistIds = (options.containerAlbumArtists || []).map(getId);
|
||||
|
||||
for (let i = 0, length = items.length; i < length; i++) {
|
||||
const item = items[i];
|
||||
|
|
|
@ -47,7 +47,7 @@ import '../elements/emby-button/emby-button';
|
|||
return true;
|
||||
}
|
||||
|
||||
function configureSwipeTabs(view, tabsElem, getTabContainersFn) {
|
||||
function configureSwipeTabs(view, tabsElem) {
|
||||
if (!browser.touch) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -490,9 +490,7 @@ import '../../elements/emby-button/emby-button';
|
|||
})[0];
|
||||
}
|
||||
|
||||
export function getMediaInfoStats(item, options) {
|
||||
options = options || {};
|
||||
|
||||
export function getMediaInfoStats(item) {
|
||||
const list = [];
|
||||
|
||||
const mediaSource = (item.MediaSources || [])[0] || {};
|
||||
|
|
|
@ -31,7 +31,7 @@ import template from './metadataEditor.template.html';
|
|||
return currentContext.classList.contains('dialog');
|
||||
}
|
||||
|
||||
function closeDialog(isSubmitted) {
|
||||
function closeDialog() {
|
||||
if (isDialog()) {
|
||||
dialogHelper.close(currentContext);
|
||||
}
|
||||
|
@ -298,7 +298,7 @@ import template from './metadataEditor.template.html';
|
|||
}
|
||||
}
|
||||
|
||||
function init(context, apiClient) {
|
||||
function init(context) {
|
||||
context.querySelector('.externalIds').addEventListener('click', function (e) {
|
||||
const btnOpenExternalId = dom.parentWithClass(e.target, 'btnOpenExternalId');
|
||||
if (btnOpenExternalId) {
|
||||
|
@ -328,7 +328,7 @@ import template from './metadataEditor.template.html';
|
|||
});
|
||||
});
|
||||
|
||||
context.querySelector('.btnHeaderSave').addEventListener('click', function (e) {
|
||||
context.querySelector('.btnHeaderSave').addEventListener('click', function () {
|
||||
context.querySelector('.btnSave').click();
|
||||
});
|
||||
|
||||
|
@ -347,7 +347,7 @@ import template from './metadataEditor.template.html';
|
|||
form.removeEventListener('submit', onSubmit);
|
||||
form.addEventListener('submit', onSubmit);
|
||||
|
||||
context.querySelector('#btnAddPerson').addEventListener('click', function (event, data) {
|
||||
context.querySelector('#btnAddPerson').addEventListener('click', function () {
|
||||
editPerson(context, {}, -1);
|
||||
});
|
||||
|
||||
|
@ -1026,7 +1026,7 @@ import template from './metadataEditor.template.html';
|
|||
});
|
||||
}
|
||||
|
||||
function show(itemId, serverId, resolve, reject) {
|
||||
function show(itemId, serverId, resolve) {
|
||||
loading.show();
|
||||
|
||||
const dialogOptions = {
|
||||
|
@ -1079,7 +1079,7 @@ import template from './metadataEditor.template.html';
|
|||
},
|
||||
|
||||
embed: function (elem, itemId, serverId) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
return new Promise(function () {
|
||||
loading.show();
|
||||
|
||||
elem.innerHTML = globalize.translateHtml(template, 'core');
|
||||
|
|
|
@ -63,7 +63,7 @@ import template from './personEditor.template.html';
|
|||
}
|
||||
});
|
||||
|
||||
dlg.querySelector('.selectPersonType').addEventListener('change', function (e) {
|
||||
dlg.querySelector('.selectPersonType').addEventListener('change', function () {
|
||||
if (this.value === 'Actor') {
|
||||
dlg.querySelector('.fldRole').classList.remove('hide');
|
||||
} else {
|
||||
|
@ -71,7 +71,7 @@ import template from './personEditor.template.html';
|
|||
}
|
||||
});
|
||||
|
||||
dlg.querySelector('.btnCancel').addEventListener('click', function (e) {
|
||||
dlg.querySelector('.btnCancel').addEventListener('click', function () {
|
||||
dialogHelper.close(dlg);
|
||||
});
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ import confirm from '../confirm/confirm';
|
|||
}
|
||||
}
|
||||
|
||||
function onSelectionChange(e) {
|
||||
function onSelectionChange() {
|
||||
updateItemSelection(this, this.checked);
|
||||
}
|
||||
|
||||
|
@ -459,7 +459,7 @@ import confirm from '../confirm/confirm';
|
|||
touchStartTimeout = setTimeout(onTouchStartTimerFired, 550);
|
||||
}
|
||||
|
||||
function onMouseOut(e) {
|
||||
function onMouseOut() {
|
||||
if (touchStartTimeout) {
|
||||
clearTimeout(touchStartTimeout);
|
||||
touchStartTimeout = null;
|
||||
|
|
|
@ -41,7 +41,7 @@ function resetRegistration() {
|
|||
|
||||
resetRegistration();
|
||||
|
||||
function showPersistentNotification(title, options, timeoutMs) {
|
||||
function showPersistentNotification(title, options) {
|
||||
serviceWorkerRegistration.showNotification(title, options);
|
||||
}
|
||||
|
||||
|
@ -219,7 +219,7 @@ Events.on(serverNotifications, 'PackageInstalling', function (e, apiClient, data
|
|||
showPackageInstallNotification(apiClient, data, 'progress');
|
||||
});
|
||||
|
||||
Events.on(serverNotifications, 'ServerShuttingDown', function (e, apiClient, data) {
|
||||
Events.on(serverNotifications, 'ServerShuttingDown', function (e, apiClient) {
|
||||
const serverId = apiClient.serverInfo().Id;
|
||||
const notification = {
|
||||
tag: 'restart' + serverId,
|
||||
|
@ -228,7 +228,7 @@ Events.on(serverNotifications, 'ServerShuttingDown', function (e, apiClient, dat
|
|||
showNotification(notification, 0, apiClient);
|
||||
});
|
||||
|
||||
Events.on(serverNotifications, 'ServerRestarting', function (e, apiClient, data) {
|
||||
Events.on(serverNotifications, 'ServerRestarting', function (e, apiClient) {
|
||||
const serverId = apiClient.serverInfo().Id;
|
||||
const notification = {
|
||||
tag: 'restart' + serverId,
|
||||
|
|
|
@ -648,7 +648,7 @@ import { appRouter } from '../appRouter';
|
|||
}
|
||||
}
|
||||
|
||||
function onPlayPauseStateChanged(e) {
|
||||
function onPlayPauseStateChanged() {
|
||||
if (!isEnabled) {
|
||||
return;
|
||||
}
|
||||
|
@ -682,7 +682,7 @@ import { appRouter } from '../appRouter';
|
|||
updatePlayerStateInternal(event, state, player);
|
||||
}
|
||||
|
||||
function onTimeUpdate(e) {
|
||||
function onTimeUpdate() {
|
||||
if (!isEnabled) {
|
||||
return;
|
||||
}
|
||||
|
@ -718,7 +718,7 @@ import { appRouter } from '../appRouter';
|
|||
}
|
||||
}
|
||||
|
||||
function onVolumeChanged(e) {
|
||||
function onVolumeChanged() {
|
||||
if (!isEnabled) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ function releaseCurrentPlayer() {
|
|||
}
|
||||
}
|
||||
|
||||
function onBrightnessChanged(e) {
|
||||
function onBrightnessChanged() {
|
||||
const player = this;
|
||||
|
||||
ensureOsdElement();
|
||||
|
|
|
@ -270,7 +270,7 @@ function getIntros(firstItem, apiClient, options) {
|
|||
|
||||
return apiClient.getIntros(firstItem.Id).then(function (result) {
|
||||
return result;
|
||||
}, function (err) {
|
||||
}, function () {
|
||||
return Promise.resolve({
|
||||
Items: []
|
||||
});
|
||||
|
@ -619,7 +619,7 @@ function supportsDirectPlay(apiClient, item, mediaSource) {
|
|||
return isHostReachable(mediaSource, apiClient);
|
||||
}
|
||||
} else if (mediaSource.Protocol === 'File') {
|
||||
return new Promise(function (resolve, reject) {
|
||||
return new Promise(function (resolve) {
|
||||
// Determine if the file can be accessed directly
|
||||
import('../../scripts/filesystem').then((filesystem) => {
|
||||
const method = isFolderRip ?
|
||||
|
@ -1711,7 +1711,7 @@ class PlaybackManager {
|
|||
});
|
||||
}
|
||||
|
||||
function changeStreamToUrl(apiClient, player, playSessionId, streamInfo, newPositionTicks) {
|
||||
function changeStreamToUrl(apiClient, player, playSessionId, streamInfo) {
|
||||
const playerData = getPlayerData(player);
|
||||
|
||||
playerData.isChangingStream = true;
|
||||
|
@ -2037,7 +2037,7 @@ class PlaybackManager {
|
|||
// Only used internally
|
||||
self.getCurrentTicks = getCurrentTicks;
|
||||
|
||||
function playOther(items, options, user) {
|
||||
function playOther(items, options) {
|
||||
const playStartIndex = options.startIndex || 0;
|
||||
const player = getPlayer(items[playStartIndex], options);
|
||||
|
||||
|
@ -3030,27 +3030,27 @@ class PlaybackManager {
|
|||
}
|
||||
}
|
||||
|
||||
function onPlaybackTimeUpdate(e) {
|
||||
function onPlaybackTimeUpdate() {
|
||||
const player = this;
|
||||
sendProgressUpdate(player, 'timeupdate');
|
||||
}
|
||||
|
||||
function onPlaybackPause(e) {
|
||||
function onPlaybackPause() {
|
||||
const player = this;
|
||||
sendProgressUpdate(player, 'pause');
|
||||
}
|
||||
|
||||
function onPlaybackUnpause(e) {
|
||||
function onPlaybackUnpause() {
|
||||
const player = this;
|
||||
sendProgressUpdate(player, 'unpause');
|
||||
}
|
||||
|
||||
function onPlaybackVolumeChange(e) {
|
||||
function onPlaybackVolumeChange() {
|
||||
const player = this;
|
||||
sendProgressUpdate(player, 'volumechange');
|
||||
}
|
||||
|
||||
function onRepeatModeChange(e) {
|
||||
function onRepeatModeChange() {
|
||||
const player = this;
|
||||
sendProgressUpdate(player, 'repeatmodechange');
|
||||
}
|
||||
|
@ -3060,17 +3060,17 @@ class PlaybackManager {
|
|||
sendProgressUpdate(player, 'shufflequeuemodechange');
|
||||
}
|
||||
|
||||
function onPlaylistItemMove(e) {
|
||||
function onPlaylistItemMove() {
|
||||
const player = this;
|
||||
sendProgressUpdate(player, 'playlistitemmove', true);
|
||||
}
|
||||
|
||||
function onPlaylistItemRemove(e) {
|
||||
function onPlaylistItemRemove() {
|
||||
const player = this;
|
||||
sendProgressUpdate(player, 'playlistitemremove', true);
|
||||
}
|
||||
|
||||
function onPlaylistItemAdd(e) {
|
||||
function onPlaylistItemAdd() {
|
||||
const player = this;
|
||||
sendProgressUpdate(player, 'playlistitemadd', true);
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ function onOrientationChangeError(err) {
|
|||
console.error('error locking orientation: ' + err);
|
||||
}
|
||||
|
||||
Events.on(playbackManager, 'playbackstart', function (e, player, state) {
|
||||
Events.on(playbackManager, 'playbackstart', function (e, player) {
|
||||
const isLocalVideo = player.isLocalPlayer && !player.isExternalPlayer && playbackManager.isPlayingVideo(player);
|
||||
|
||||
if (isLocalVideo && layoutManager.mobile) {
|
||||
|
|
|
@ -301,15 +301,15 @@ Events.on(appSettings, 'change', function (e, name) {
|
|||
}
|
||||
});
|
||||
|
||||
Events.on(playbackManager, 'pairing', function (e) {
|
||||
Events.on(playbackManager, 'pairing', function () {
|
||||
loading.show();
|
||||
});
|
||||
|
||||
Events.on(playbackManager, 'paired', function (e) {
|
||||
Events.on(playbackManager, 'paired', function () {
|
||||
loading.hide();
|
||||
});
|
||||
|
||||
Events.on(playbackManager, 'pairerror', function (e) {
|
||||
Events.on(playbackManager, 'pairerror', function () {
|
||||
loading.hide();
|
||||
});
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ class PlayQueueManager {
|
|||
return this._currentPlaylistItemId;
|
||||
}
|
||||
|
||||
setPlaylistState(playlistItemId, playlistIndex) {
|
||||
setPlaylistState(playlistItemId) {
|
||||
this._currentPlaylistItemId = playlistItemId;
|
||||
}
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ function releaseCurrentPlayer() {
|
|||
}
|
||||
}
|
||||
|
||||
function onVolumeChanged(e) {
|
||||
function onVolumeChanged() {
|
||||
const player = this;
|
||||
|
||||
ensureOsdElement();
|
||||
|
|
|
@ -196,7 +196,7 @@ import ServerConnections from '../ServerConnections';
|
|||
}
|
||||
}
|
||||
|
||||
function getMediaSourceStats(session, player, displayPlayMethod) {
|
||||
function getMediaSourceStats(session, player) {
|
||||
const sessionStats = [];
|
||||
|
||||
const mediaSource = playbackManager.currentMediaSource(player) || {};
|
||||
|
|
|
@ -5,7 +5,7 @@ import '../../elements/emby-button/emby-button';
|
|||
import './recordingfields.scss';
|
||||
import ServerConnections from '../ServerConnections';
|
||||
|
||||
function onRecordingButtonClick(e) {
|
||||
function onRecordingButtonClick() {
|
||||
const item = this.item;
|
||||
|
||||
if (item) {
|
||||
|
|
|
@ -28,7 +28,7 @@ function deleteTimer(apiClient, timerId) {
|
|||
});
|
||||
}
|
||||
|
||||
function renderTimer(context, item, apiClient) {
|
||||
function renderTimer(context, item) {
|
||||
context.querySelector('#txtPrePaddingMinutes').value = item.PrePaddingSeconds / 60;
|
||||
context.querySelector('#txtPostPaddingMinutes').value = item.PostPaddingSeconds / 60;
|
||||
|
||||
|
@ -85,7 +85,7 @@ function reload(context, id) {
|
|||
}
|
||||
|
||||
function showEditor(itemId, serverId, options) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
return new Promise(function (resolve) {
|
||||
recordingDeleted = false;
|
||||
currentServerId = serverId;
|
||||
loading.show();
|
||||
|
|
|
@ -14,7 +14,7 @@ import template from './recordingfields.template.html';
|
|||
|
||||
/*eslint prefer-const: "error"*/
|
||||
|
||||
function loadData(parent, program, apiClient) {
|
||||
function loadData(parent, program) {
|
||||
if (program.IsSeries) {
|
||||
parent.querySelector('.recordSeriesContainer').classList.remove('hide');
|
||||
} else {
|
||||
|
@ -119,7 +119,7 @@ class RecordingEditor {
|
|||
|
||||
embed() {
|
||||
const self = this;
|
||||
return new Promise(function (resolve, reject) {
|
||||
return new Promise(function (resolve) {
|
||||
const options = self.options;
|
||||
const context = options.parent;
|
||||
context.innerHTML = globalize.translateHtml(template, 'core');
|
||||
|
@ -156,7 +156,7 @@ class RecordingEditor {
|
|||
}
|
||||
}
|
||||
|
||||
function onManageRecordingClick(e) {
|
||||
function onManageRecordingClick() {
|
||||
const options = this.options;
|
||||
if (!this.TimerId || this.Status === 'Cancelled') {
|
||||
return;
|
||||
|
@ -172,7 +172,7 @@ function onManageRecordingClick(e) {
|
|||
});
|
||||
}
|
||||
|
||||
function onManageSeriesRecordingClick(e) {
|
||||
function onManageSeriesRecordingClick() {
|
||||
const options = this.options;
|
||||
|
||||
if (!this.SeriesTimerId) {
|
||||
|
|
|
@ -155,7 +155,7 @@ class RefreshDialog {
|
|||
centerFocus(dlg.querySelector('.formDialogContent'), false, true);
|
||||
}
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
return new Promise(function (resolve) {
|
||||
if (layoutManager.tv) {
|
||||
centerFocus(dlg.querySelector('.formDialogContent'), false, false);
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ import { appRouter } from '../appRouter';
|
|||
let showMuteButton = true;
|
||||
let showVolumeSlider = true;
|
||||
|
||||
function showAudioMenu(context, player, button, item) {
|
||||
function showAudioMenu(context, player, button) {
|
||||
const currentIndex = playbackManager.getAudioStreamIndex(player);
|
||||
const streams = playbackManager.audioTracks(player);
|
||||
const menuItems = streams.map(function (s) {
|
||||
|
@ -51,7 +51,7 @@ function showAudioMenu(context, player, button, item) {
|
|||
});
|
||||
}
|
||||
|
||||
function showSubtitleMenu(context, player, button, item) {
|
||||
function showSubtitleMenu(context, player, button) {
|
||||
const currentIndex = playbackManager.getSubtitleStreamIndex(player);
|
||||
const streams = playbackManager.subtitleTracks(player);
|
||||
const menuItems = streams.map(function (s) {
|
||||
|
@ -572,7 +572,7 @@ export default function () {
|
|||
}
|
||||
}
|
||||
|
||||
function onPlaylistUpdate(e) {
|
||||
function onPlaylistUpdate() {
|
||||
loadPlaylist(dlg, this);
|
||||
}
|
||||
|
||||
|
@ -603,7 +603,7 @@ export default function () {
|
|||
}
|
||||
}
|
||||
|
||||
function onPlayPauseStateChanged(e) {
|
||||
function onPlayPauseStateChanged() {
|
||||
updatePlayPauseState(this.paused(), true);
|
||||
}
|
||||
|
||||
|
@ -613,7 +613,7 @@ export default function () {
|
|||
onPlaylistUpdate();
|
||||
}
|
||||
|
||||
function onTimeUpdate(e) {
|
||||
function onTimeUpdate() {
|
||||
const now = new Date().getTime();
|
||||
|
||||
if (!(now - lastUpdateTime < 700)) {
|
||||
|
@ -624,7 +624,7 @@ export default function () {
|
|||
}
|
||||
}
|
||||
|
||||
function onVolumeChanged(e) {
|
||||
function onVolumeChanged() {
|
||||
const player = this;
|
||||
updatePlayerVolumeState(dlg, player.isMuted(), player.getVolume());
|
||||
}
|
||||
|
@ -922,13 +922,13 @@ export default function () {
|
|||
}
|
||||
}
|
||||
|
||||
function onDialogClosed(e) {
|
||||
function onDialogClosed() {
|
||||
releaseCurrentPlayer();
|
||||
Events.off(playbackManager, 'playerchange', onPlayerChange);
|
||||
lastPlayerState = null;
|
||||
}
|
||||
|
||||
function onShow(context, tab) {
|
||||
function onShow(context) {
|
||||
bindToPlayer(context, playbackManager.getCurrentPlayer());
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ import template from './searchfields.template.html';
|
|||
triggerSearch(searchFieldsInstance, value);
|
||||
}
|
||||
|
||||
function embed(elem, instance, options) {
|
||||
function embed(elem, instance) {
|
||||
let html = globalize.translateHtml(template, 'core');
|
||||
|
||||
if (browser.tizen || browser.orsay) {
|
||||
|
|
|
@ -585,7 +585,7 @@ import template from './searchresults.template.html';
|
|||
return originalString.replace(reg, strWith);
|
||||
}
|
||||
|
||||
function embed(elem, instance, options) {
|
||||
function embed(elem, instance) {
|
||||
let workingTemplate = template;
|
||||
if (!enableScrollX()) {
|
||||
workingTemplate = replaceAll(workingTemplate, 'data-horizontal="true"', 'data-horizontal="false"');
|
||||
|
|
|
@ -210,7 +210,7 @@ export default function (options) {
|
|||
dialog.innerHTML = html;
|
||||
|
||||
if (options.interactive && !layoutManager.tv) {
|
||||
dialog.querySelector('.btnSlideshowExit').addEventListener('click', function (e) {
|
||||
dialog.querySelector('.btnSlideshowExit').addEventListener('click', function () {
|
||||
dialogHelper.close(dialog);
|
||||
});
|
||||
|
||||
|
@ -381,10 +381,9 @@ export default function (options) {
|
|||
/**
|
||||
* Renders the HTML markup of a slide for an item or a slide.
|
||||
* @param {Object} item - The item used to render the slide.
|
||||
* @param {number} index - The index of the item in the Swiper instance.
|
||||
* @returns {string} The HTML markup of the slide.
|
||||
*/
|
||||
function getSwiperSlideHtml(item, index) {
|
||||
function getSwiperSlideHtml(item) {
|
||||
if (currentOptions.slides) {
|
||||
return getSwiperSlideHtmlFromSlide(item);
|
||||
} else {
|
||||
|
|
|
@ -108,7 +108,7 @@ function initEditor(page) {
|
|||
});
|
||||
}
|
||||
|
||||
function showEditor(options, resolve, reject) {
|
||||
function showEditor(options, resolve) {
|
||||
options = options || {};
|
||||
currentItemId = options.itemId;
|
||||
currentServerId = options.serverId;
|
||||
|
|
|
@ -130,7 +130,7 @@ class Manager {
|
|||
/**
|
||||
* Called when the player changes.
|
||||
*/
|
||||
onPlayerChange(newPlayer, newTarget, oldPlayer) {
|
||||
onPlayerChange(newPlayer) {
|
||||
this.bindToPlayer(newPlayer);
|
||||
}
|
||||
|
||||
|
@ -228,9 +228,8 @@ class Manager {
|
|||
/**
|
||||
* Handles a playback command from the server.
|
||||
* @param {Object} cmd The playback command.
|
||||
* @param {Object} apiClient The ApiClient.
|
||||
*/
|
||||
processCommand(cmd, apiClient) {
|
||||
processCommand(cmd) {
|
||||
if (cmd === null) return;
|
||||
|
||||
if (typeof cmd.When === 'string') {
|
||||
|
@ -277,9 +276,8 @@ class Manager {
|
|||
/**
|
||||
* Handles a group state change.
|
||||
* @param {Object} update The group state update.
|
||||
* @param {Object} apiClient The ApiClient.
|
||||
*/
|
||||
processStateChange(update, apiClient) {
|
||||
processStateChange(update) {
|
||||
if (update === null || update.State === null || update.Reason === null) return;
|
||||
|
||||
if (!this.isSyncPlayEnabled()) {
|
||||
|
|
|
@ -158,6 +158,7 @@ class GenericPlayer {
|
|||
* Sets the playback rate, if supported.
|
||||
* @param {number} value The playback rate.
|
||||
*/
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
setPlaybackRate(value) {
|
||||
// Do nothing.
|
||||
}
|
||||
|
@ -196,6 +197,7 @@ class GenericPlayer {
|
|||
* Seeks the player to the specified position.
|
||||
* @param {number} positionTicks The new position.
|
||||
*/
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
localSeek(positionTicks) {
|
||||
|
||||
}
|
||||
|
@ -211,6 +213,7 @@ class GenericPlayer {
|
|||
* Sends a command to the player.
|
||||
* @param {Object} command The command.
|
||||
*/
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
localSendCommand(command) {
|
||||
|
||||
}
|
||||
|
@ -219,6 +222,7 @@ class GenericPlayer {
|
|||
* Starts playback.
|
||||
* @param {Object} options Playback data.
|
||||
*/
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
localPlay(options) {
|
||||
|
||||
}
|
||||
|
@ -227,6 +231,7 @@ class GenericPlayer {
|
|||
* Sets playing item from playlist.
|
||||
* @param {string} playlistItemId The item to play.
|
||||
*/
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
localSetCurrentPlaylistItem(playlistItemId) {
|
||||
|
||||
}
|
||||
|
@ -235,6 +240,7 @@ class GenericPlayer {
|
|||
* Removes items from playlist.
|
||||
* @param {Array} playlistItemIds The items to remove.
|
||||
*/
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
localRemoveFromPlaylist(playlistItemIds) {
|
||||
|
||||
}
|
||||
|
@ -244,6 +250,7 @@ class GenericPlayer {
|
|||
* @param {string} playlistItemId The item to move.
|
||||
* @param {number} newIndex The new position.
|
||||
*/
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
localMovePlaylistItem(playlistItemId, newIndex) {
|
||||
|
||||
}
|
||||
|
@ -252,6 +259,7 @@ class GenericPlayer {
|
|||
* Queues in the playlist.
|
||||
* @param {Object} options Queue data.
|
||||
*/
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
localQueue(options) {
|
||||
|
||||
}
|
||||
|
@ -260,6 +268,7 @@ class GenericPlayer {
|
|||
* Queues after the playing item in the playlist.
|
||||
* @param {Object} options Queue data.
|
||||
*/
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
localQueueNext(options) {
|
||||
|
||||
}
|
||||
|
@ -282,6 +291,7 @@ class GenericPlayer {
|
|||
* Sets repeat mode.
|
||||
* @param {string} value The repeat mode.
|
||||
*/
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
localSetRepeatMode(value) {
|
||||
|
||||
}
|
||||
|
@ -290,6 +300,7 @@ class GenericPlayer {
|
|||
* Sets shuffle mode.
|
||||
* @param {string} value The shuffle mode.
|
||||
*/
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
localSetQueueShuffleMode(value) {
|
||||
|
||||
}
|
||||
|
|
|
@ -135,7 +135,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
|||
/**
|
||||
* Overrides PlaybackManager's seek method.
|
||||
*/
|
||||
seekRequest(positionTicks, player) {
|
||||
seekRequest(positionTicks) {
|
||||
const controller = syncPlayManager.getController();
|
||||
controller.seek(positionTicks);
|
||||
}
|
||||
|
@ -148,19 +148,19 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
|||
const controller = syncPlayManager.getController();
|
||||
const playerWrapper = syncPlayManager.getPlayerWrapper();
|
||||
|
||||
const defaultAction = (_command, _player) => {
|
||||
const defaultAction = (_command) => {
|
||||
playerWrapper.localSendCommand(_command);
|
||||
};
|
||||
|
||||
const ignoreCallback = (_command, _player) => {
|
||||
const ignoreCallback = () => {
|
||||
// Do nothing.
|
||||
};
|
||||
|
||||
const SetRepeatModeCallback = (_command, _player) => {
|
||||
const SetRepeatModeCallback = (_command) => {
|
||||
controller.setRepeatMode(_command.Arguments.RepeatMode);
|
||||
};
|
||||
|
||||
const SetShuffleQueueCallback = (_command, _player) => {
|
||||
const SetShuffleQueueCallback = (_command) => {
|
||||
controller.setShuffleMode(_command.Arguments.ShuffleMode);
|
||||
};
|
||||
|
||||
|
@ -242,7 +242,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
|||
/**
|
||||
* Overrides PlaybackManager's setCurrentPlaylistItem method.
|
||||
*/
|
||||
setCurrentPlaylistItemRequest(playlistItemId, player) {
|
||||
setCurrentPlaylistItemRequest(playlistItemId) {
|
||||
const controller = syncPlayManager.getController();
|
||||
controller.setCurrentPlaylistItem(playlistItemId);
|
||||
}
|
||||
|
@ -250,7 +250,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
|||
/**
|
||||
* Overrides PlaybackManager's removeFromPlaylist method.
|
||||
*/
|
||||
removeFromPlaylistRequest(playlistItemIds, player) {
|
||||
removeFromPlaylistRequest(playlistItemIds) {
|
||||
const controller = syncPlayManager.getController();
|
||||
controller.removeFromPlaylist(playlistItemIds);
|
||||
}
|
||||
|
@ -258,7 +258,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
|||
/**
|
||||
* Overrides PlaybackManager's movePlaylistItem method.
|
||||
*/
|
||||
movePlaylistItemRequest(playlistItemId, newIndex, player) {
|
||||
movePlaylistItemRequest(playlistItemId, newIndex) {
|
||||
const controller = syncPlayManager.getController();
|
||||
controller.movePlaylistItem(playlistItemId, newIndex);
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
|||
/**
|
||||
* Overrides PlaybackManager's queue method.
|
||||
*/
|
||||
queueRequest(options, player) {
|
||||
queueRequest(options) {
|
||||
const controller = syncPlayManager.getController();
|
||||
controller.queue(options);
|
||||
}
|
||||
|
@ -274,7 +274,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
|||
/**
|
||||
* Overrides PlaybackManager's queueNext method.
|
||||
*/
|
||||
queueNextRequest(options, player) {
|
||||
queueNextRequest(options) {
|
||||
const controller = syncPlayManager.getController();
|
||||
controller.queueNext(options);
|
||||
}
|
||||
|
@ -282,7 +282,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
|||
/**
|
||||
* Overrides PlaybackManager's nextTrack method.
|
||||
*/
|
||||
nextTrackRequest(player) {
|
||||
nextTrackRequest() {
|
||||
const controller = syncPlayManager.getController();
|
||||
controller.nextItem();
|
||||
}
|
||||
|
@ -290,7 +290,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
|||
/**
|
||||
* Overrides PlaybackManager's previousTrack method.
|
||||
*/
|
||||
previousTrackRequest(player) {
|
||||
previousTrackRequest() {
|
||||
const controller = syncPlayManager.getController();
|
||||
controller.previousItem();
|
||||
}
|
||||
|
@ -298,7 +298,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
|||
/**
|
||||
* Overrides PlaybackManager's setRepeatMode method.
|
||||
*/
|
||||
setRepeatModeRequest(mode, player) {
|
||||
setRepeatModeRequest(mode) {
|
||||
const controller = syncPlayManager.getController();
|
||||
controller.setRepeatMode(mode);
|
||||
}
|
||||
|
@ -306,7 +306,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
|||
/**
|
||||
* Overrides PlaybackManager's setQueueShuffleMode method.
|
||||
*/
|
||||
setQueueShuffleModeRequest(mode, player) {
|
||||
setQueueShuffleModeRequest(mode) {
|
||||
const controller = syncPlayManager.getController();
|
||||
controller.setShuffleMode(mode);
|
||||
}
|
||||
|
@ -314,7 +314,7 @@ class NoActivePlayer extends SyncPlay.Players.GenericPlayer {
|
|||
/**
|
||||
* Overrides PlaybackManager's toggleQueueShuffleMode method.
|
||||
*/
|
||||
toggleQueueShuffleModeRequest(player) {
|
||||
toggleQueueShuffleModeRequest() {
|
||||
const controller = syncPlayManager.getController();
|
||||
controller.toggleShuffleMode();
|
||||
}
|
||||
|
|
|
@ -21,14 +21,14 @@ class QueueManager {
|
|||
/**
|
||||
* Placeholder for original PlayQueueManager method.
|
||||
*/
|
||||
setPlaylist(items) {
|
||||
setPlaylist() {
|
||||
// Do nothing.
|
||||
}
|
||||
|
||||
/**
|
||||
* Placeholder for original PlayQueueManager method.
|
||||
*/
|
||||
queue(items) {
|
||||
queue() {
|
||||
// Do nothing.
|
||||
}
|
||||
|
||||
|
@ -49,14 +49,14 @@ class QueueManager {
|
|||
/**
|
||||
* Placeholder for original PlayQueueManager method.
|
||||
*/
|
||||
clearPlaylist(clearCurrentItem = false) {
|
||||
clearPlaylist() {
|
||||
// Do nothing.
|
||||
}
|
||||
|
||||
/**
|
||||
* Placeholder for original PlayQueueManager method.
|
||||
*/
|
||||
queueNext(items) {
|
||||
queueNext() {
|
||||
// Do nothing.
|
||||
}
|
||||
|
||||
|
@ -90,28 +90,28 @@ class QueueManager {
|
|||
/**
|
||||
* Placeholder for original PlayQueueManager method.
|
||||
*/
|
||||
setPlaylistState(playlistItemId, playlistIndex) {
|
||||
setPlaylistState() {
|
||||
// Do nothing.
|
||||
}
|
||||
|
||||
/**
|
||||
* Placeholder for original PlayQueueManager method.
|
||||
*/
|
||||
setPlaylistIndex(playlistIndex) {
|
||||
setPlaylistIndex() {
|
||||
// Do nothing.
|
||||
}
|
||||
|
||||
/**
|
||||
* Placeholder for original PlayQueueManager method.
|
||||
*/
|
||||
removeFromPlaylist(playlistItemIds) {
|
||||
removeFromPlaylist() {
|
||||
// Do nothing.
|
||||
}
|
||||
|
||||
/**
|
||||
* Placeholder for original PlayQueueManager method.
|
||||
*/
|
||||
movePlaylistItem(playlistItemId, newIndex) {
|
||||
movePlaylistItem() {
|
||||
// Do nothing.
|
||||
return {
|
||||
result: 'noop'
|
||||
|
@ -128,7 +128,7 @@ class QueueManager {
|
|||
/**
|
||||
* Placeholder for original PlayQueueManager method.
|
||||
*/
|
||||
setRepeatMode(value) {
|
||||
setRepeatMode() {
|
||||
// Do nothing.
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,7 @@ class QueueManager {
|
|||
/**
|
||||
* Placeholder for original PlayQueueManager method.
|
||||
*/
|
||||
setShuffleMode(value) {
|
||||
setShuffleMode() {
|
||||
// Do nothing.
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import layoutManager from '../layoutManager';
|
|||
import '../../elements/emby-tabs/emby-tabs';
|
||||
import { appRouter } from '../appRouter';
|
||||
|
||||
function onViewDestroy(e) {
|
||||
function onViewDestroy() {
|
||||
const tabControllers = this.tabControllers;
|
||||
|
||||
if (tabControllers) {
|
||||
|
@ -78,7 +78,7 @@ class TabbedView {
|
|||
|
||||
view.addEventListener('viewbeforehide', this.onPause.bind(this));
|
||||
|
||||
view.addEventListener('viewbeforeshow', function (e) {
|
||||
view.addEventListener('viewbeforeshow', function () {
|
||||
mainTabsManager.setTabs(view, currentTabIndex, self.getTabs, getTabContainers, onBeforeTabChange, onTabChange, false);
|
||||
});
|
||||
|
||||
|
@ -89,7 +89,7 @@ class TabbedView {
|
|||
view.addEventListener('viewdestroy', onViewDestroy.bind(this));
|
||||
}
|
||||
|
||||
onResume(options) {
|
||||
onResume() {
|
||||
this.setTitle();
|
||||
backdrop.clearBackdrop();
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ function renderDevices(view, devices) {
|
|||
}
|
||||
}
|
||||
|
||||
function discoverDevices(view, apiClient) {
|
||||
function discoverDevices(view) {
|
||||
loading.show();
|
||||
view.querySelector('.loadingContent').classList.remove('hide');
|
||||
return ApiClient.getJSON(ApiClient.getUrl('LiveTv/Tuners/Discvover', {
|
||||
|
|
|
@ -149,7 +149,7 @@ export default function (page, providerId, options) {
|
|||
}),
|
||||
data: JSON.stringify(info),
|
||||
contentType: 'application/json'
|
||||
}).then(function (result) {
|
||||
}).then(function () {
|
||||
loading.hide();
|
||||
|
||||
if (options.showConfirmation) {
|
||||
|
@ -190,7 +190,7 @@ export default function (page, providerId, options) {
|
|||
}
|
||||
|
||||
loading.hide();
|
||||
}, function (result) {
|
||||
}, function () {
|
||||
Dashboard.alert({
|
||||
message: globalize.translate('ErrorGettingTvLineups')
|
||||
});
|
||||
|
|
|
@ -88,7 +88,7 @@ export default function (page, providerId, options) {
|
|||
}),
|
||||
data: JSON.stringify(info),
|
||||
contentType: 'application/json'
|
||||
}).then(function (result) {
|
||||
}).then(function () {
|
||||
loading.hide();
|
||||
|
||||
if (options.showConfirmation !== false) {
|
||||
|
|
|
@ -218,7 +218,7 @@ import confirm from '../../components/confirm/confirm';
|
|||
});
|
||||
}
|
||||
|
||||
function renderInfo(view, sessions, forceUpdate) {
|
||||
function renderInfo(view, sessions) {
|
||||
sessions = filterSessions(sessions);
|
||||
renderActiveConnections(view, sessions);
|
||||
loading.hide();
|
||||
|
@ -730,7 +730,7 @@ import confirm from '../../components/confirm/confirm';
|
|||
});
|
||||
}
|
||||
};
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
function onRestartRequired(evt, apiClient) {
|
||||
console.debug('onRestartRequired not implemented', evt, apiClient);
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ import Dashboard from '../../../scripts/clientUtils';
|
|||
return false;
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
view.querySelector('form').addEventListener('submit', onSubmit);
|
||||
view.addEventListener('viewshow', loadData);
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ import confirm from '../../../components/confirm/confirm';
|
|||
}
|
||||
|
||||
const canEdit = ApiClient.isMinServerVersion('3.4.1.31');
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
view.querySelector('.devicesList').addEventListener('click', function (e) {
|
||||
const btnDeviceMenu = dom.parentWithClass(e.target, 'btnDeviceMenu');
|
||||
|
||||
|
|
|
@ -48,13 +48,13 @@ import alert from '../../components/alert';
|
|||
loading.hide();
|
||||
}
|
||||
|
||||
function onSaveEncodingPathFailure(response) {
|
||||
function onSaveEncodingPathFailure() {
|
||||
loading.hide();
|
||||
alert(globalize.translate('FFmpegSavePathNotFound'));
|
||||
}
|
||||
|
||||
function updateEncoder(form) {
|
||||
return ApiClient.getSystemInfo().then(function (systemInfo) {
|
||||
return ApiClient.getSystemInfo().then(function () {
|
||||
return ApiClient.ajax({
|
||||
url: ApiClient.getUrl('System/MediaEncoder/Path'),
|
||||
type: 'POST',
|
||||
|
|
|
@ -19,7 +19,6 @@ import alert from '../../components/alert';
|
|||
$('#selectLocalizationLanguage', page).html(languageOptions.map(function (language) {
|
||||
return '<option value="' + language.Value + '">' + language.Name + '</option>';
|
||||
})).val(config.UICulture);
|
||||
currentLanguage = config.UICulture;
|
||||
|
||||
loading.hide();
|
||||
}
|
||||
|
@ -34,16 +33,11 @@ import alert from '../../components/alert';
|
|||
config.CachePath = form.querySelector('#txtCachePath').value;
|
||||
config.MetadataPath = $('#txtMetadataPath', form).val();
|
||||
config.MetadataNetworkPath = $('#txtMetadataNetworkPath', form).val();
|
||||
let requiresReload = config.UICulture !== currentLanguage;
|
||||
ApiClient.updateServerConfiguration(config).then(function() {
|
||||
ApiClient.getNamedConfiguration(brandingConfigKey).then(function(brandingConfig) {
|
||||
brandingConfig.LoginDisclaimer = form.querySelector('#txtLoginDisclaimer').value;
|
||||
brandingConfig.CustomCss = form.querySelector('#txtCustomCss').value;
|
||||
|
||||
if (currentBrandingOptions && brandingConfig.CustomCss !== currentBrandingOptions.CustomCss) {
|
||||
requiresReload = true;
|
||||
}
|
||||
|
||||
ApiClient.updateNamedConfiguration(brandingConfigKey, brandingConfig).then(function () {
|
||||
Dashboard.processServerConfigurationUpdateResult();
|
||||
});
|
||||
|
@ -56,10 +50,8 @@ import alert from '../../components/alert';
|
|||
return false;
|
||||
}
|
||||
|
||||
let currentBrandingOptions;
|
||||
let currentLanguage;
|
||||
const brandingConfigKey = 'branding';
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
$('#btnSelectCachePath', view).on('click.selectDirectory', function () {
|
||||
import('../../components/directorybrowser/directorybrowser').then(({default: directoryBrowser}) => {
|
||||
const picker = new directoryBrowser();
|
||||
|
@ -110,7 +102,6 @@ import alert from '../../components/alert';
|
|||
loadPage(view, responses[0], responses[1], responses[2]);
|
||||
});
|
||||
ApiClient.getNamedConfiguration(brandingConfigKey).then(function (config) {
|
||||
currentBrandingOptions = config;
|
||||
view.querySelector('#txtLoginDisclaimer').value = config.LoginDisclaimer || '';
|
||||
view.querySelector('#txtCustomCss').value = config.CustomCss || '';
|
||||
});
|
||||
|
|
|
@ -23,7 +23,7 @@ import Dashboard from '../../scripts/clientUtils';
|
|||
}];
|
||||
}
|
||||
|
||||
export default function(view, params) {
|
||||
export default function(view) {
|
||||
function loadData() {
|
||||
ApiClient.getServerConfiguration().then(function(config) {
|
||||
view.querySelector('.chkFolderView').checked = config.EnableFolderView;
|
||||
|
|
|
@ -6,7 +6,7 @@ import '../../assets/css/flexstyles.scss';
|
|||
|
||||
/* eslint-disable indent */
|
||||
|
||||
export default function(view, params) {
|
||||
export default function(view) {
|
||||
view.addEventListener('viewbeforeshow', function() {
|
||||
loading.show();
|
||||
const apiClient = ApiClient;
|
||||
|
|
|
@ -37,7 +37,7 @@ import alert from '../../components/alert';
|
|||
return false;
|
||||
}
|
||||
|
||||
function showConfirmMessage(config) {
|
||||
function showConfirmMessage() {
|
||||
const msg = [];
|
||||
msg.push(globalize.translate('MetadataSettingChangeHelp'));
|
||||
alert({
|
||||
|
|
|
@ -131,7 +131,7 @@ import alert from '../../components/alert';
|
|||
}
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
function loadPage(page, config) {
|
||||
page.querySelector('#txtPortNumber').value = config.HttpServerPortNumber;
|
||||
page.querySelector('#txtPublicPort').value = config.PublicPort;
|
||||
|
@ -198,7 +198,7 @@ import alert from '../../components/alert';
|
|||
});
|
||||
});
|
||||
view.querySelector('.dashboardHostingForm').addEventListener('submit', onSubmit);
|
||||
view.addEventListener('viewshow', function (e) {
|
||||
view.addEventListener('viewshow', function () {
|
||||
loading.show();
|
||||
ApiClient.getNamedConfiguration('network').then(function (config) {
|
||||
loadPage(view, config);
|
||||
|
|
|
@ -91,7 +91,7 @@ function save(page) {
|
|||
}).map(function (c) {
|
||||
return c.getAttribute('data-itemid');
|
||||
});
|
||||
ApiClient.updateNamedConfiguration(notificationsConfigurationKey, notificationOptions).then(function (r) {
|
||||
ApiClient.updateNamedConfiguration(notificationsConfigurationKey, notificationOptions).then(function () {
|
||||
Dashboard.processServerConfigurationUpdateResult();
|
||||
Dashboard.navigate('notificationsettings.html');
|
||||
});
|
||||
|
|
|
@ -54,7 +54,7 @@ function reload(page) {
|
|||
});
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
view.addEventListener('viewshow', function () {
|
||||
reload(view);
|
||||
});
|
||||
|
|
|
@ -19,7 +19,7 @@ function reloadList(page) {
|
|||
noneElement: page.querySelector('#none'),
|
||||
repositories: repositories
|
||||
});
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
console.error('error loading repositories');
|
||||
page.querySelector('#none').classList.remove('hide');
|
||||
loading.hide();
|
||||
|
@ -33,9 +33,9 @@ function saveList(page) {
|
|||
url: ApiClient.getUrl('Repositories'),
|
||||
data: JSON.stringify(repositories),
|
||||
contentType: 'application/json'
|
||||
}).then(response => {
|
||||
}).then(() => {
|
||||
reloadList(page);
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
console.error('error saving repositories');
|
||||
loading.hide();
|
||||
});
|
||||
|
@ -90,7 +90,7 @@ function getTabs() {
|
|||
}];
|
||||
}
|
||||
|
||||
export default function(view, params) {
|
||||
export default function(view) {
|
||||
view.addEventListener('viewshow', function () {
|
||||
libraryMenu.setTabs('plugins', 2, getTabs);
|
||||
reloadList(this);
|
||||
|
|
|
@ -207,7 +207,7 @@ import confirm from '../../../components/confirm/confirm';
|
|||
return trigger;
|
||||
}
|
||||
};
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
function onSubmit(e) {
|
||||
loading.show();
|
||||
const id = getParameterByName('id');
|
||||
|
|
|
@ -123,7 +123,7 @@ import '../../../elements/emby-button/emby-button';
|
|||
$(elem).parents('.listItem')[0].setAttribute('data-status', state);
|
||||
}
|
||||
|
||||
export default function(view, params) {
|
||||
export default function(view) {
|
||||
function updateTasks(tasks) {
|
||||
for (let i = 0; i < tasks.length; i++) {
|
||||
const task = tasks[i];
|
||||
|
|
|
@ -108,7 +108,7 @@ import toast from '../../../components/toast/toast';
|
|||
loading.hide();
|
||||
}
|
||||
|
||||
function onSaveComplete(page, user) {
|
||||
function onSaveComplete() {
|
||||
Dashboard.navigate('userprofiles.html');
|
||||
loading.hide();
|
||||
toast(globalize.translate('SettingsSaved'));
|
||||
|
|
|
@ -91,7 +91,7 @@ import toast from '../../../components/toast/toast';
|
|||
loading.hide();
|
||||
}
|
||||
|
||||
function onSaveComplete(page) {
|
||||
function onSaveComplete() {
|
||||
loading.hide();
|
||||
toast(globalize.translate('SettingsSaved'));
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ import toast from '../../../components/toast/toast';
|
|||
ApiClient.updateUserPolicy(user.Id, user.Policy).then(function () {
|
||||
Dashboard.navigate('useredit.html?userId=' + user.Id);
|
||||
});
|
||||
}, function (response) {
|
||||
}, function () {
|
||||
toast(globalize.translate('ErrorDefault'));
|
||||
loading.hide();
|
||||
});
|
||||
|
|
|
@ -161,7 +161,7 @@ import toast from '../../../components/toast/toast';
|
|||
});
|
||||
}
|
||||
|
||||
function onSaveComplete(page) {
|
||||
function onSaveComplete() {
|
||||
loading.hide();
|
||||
toast(globalize.translate('SettingsSaved'));
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ import cardBuilder from '../../../components/cardbuilder/cardBuilder';
|
|||
});
|
||||
}
|
||||
|
||||
function getUserHtml(user, addConnectIndicator) {
|
||||
function getUserHtml(user) {
|
||||
let html = '';
|
||||
let cssClass = 'card squareCard scalableCard squareCard-scalable';
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ function reload(context, itemId) {
|
|||
}
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
view.addEventListener('viewshow', function () {
|
||||
reload(this, MetadataEditor.getCurrentItemId());
|
||||
});
|
||||
|
|
|
@ -817,7 +817,7 @@ class ItemsView {
|
|||
itemsContainer: self.itemsContainer
|
||||
});
|
||||
});
|
||||
view.addEventListener('viewhide', function (e) {
|
||||
view.addEventListener('viewhide', function () {
|
||||
const itemsContainer = self.itemsContainer;
|
||||
|
||||
if (itemsContainer) {
|
||||
|
|
|
@ -104,7 +104,7 @@ export default function (view, params, tabContent) {
|
|||
});
|
||||
}
|
||||
|
||||
function reloadItems(context, save) {
|
||||
function reloadItems(context) {
|
||||
loading.show();
|
||||
isLoading = true;
|
||||
const query = getQuery();
|
||||
|
|
|
@ -64,7 +64,7 @@ function renderRecordingFolders(context, promise) {
|
|||
});
|
||||
}
|
||||
|
||||
function onMoreClick(e) {
|
||||
function onMoreClick() {
|
||||
const type = this.getAttribute('data-type');
|
||||
const serverId = ApiClient.serverId();
|
||||
|
||||
|
|
|
@ -246,7 +246,7 @@ function addProvider(button) {
|
|||
});
|
||||
}
|
||||
|
||||
function addDevice(button) {
|
||||
function addDevice() {
|
||||
Dashboard.navigate('livetvtuner.html');
|
||||
}
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ function submitForm(page) {
|
|||
url: ApiClient.getUrl('LiveTv/TunerHosts'),
|
||||
data: JSON.stringify(info),
|
||||
contentType: 'application/json'
|
||||
}).then(function (result) {
|
||||
}).then(function () {
|
||||
Dashboard.processServerConfigurationUpdateResult();
|
||||
Dashboard.navigate('livetvstatus.html');
|
||||
}, function () {
|
||||
|
|
|
@ -155,7 +155,7 @@ import Dashboard from '../../scripts/clientUtils';
|
|||
return html;
|
||||
}
|
||||
|
||||
function loadSuggestions(page, userId, parentId) {
|
||||
function loadSuggestions(page, userId) {
|
||||
const screenWidth = dom.getWindowSize().innerWidth;
|
||||
const url = ApiClient.getUrl('Movies/Recommendations', {
|
||||
userId: userId,
|
||||
|
@ -389,7 +389,7 @@ import Dashboard from '../../scripts/clientUtils';
|
|||
|
||||
const tabControllers = [];
|
||||
let renderedTabs = [];
|
||||
view.addEventListener('viewshow', function (e) {
|
||||
view.addEventListener('viewshow', function () {
|
||||
initTabs();
|
||||
if (!view.getAttribute('data-title')) {
|
||||
const parentId = params.topParentId;
|
||||
|
|
|
@ -185,7 +185,7 @@ import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
|||
});
|
||||
};
|
||||
|
||||
const updateFilterControls = (tabContent) => {
|
||||
const updateFilterControls = () => {
|
||||
const query = getQuery();
|
||||
|
||||
if (this.alphaPicker) {
|
||||
|
|
|
@ -373,7 +373,7 @@ import Dashboard from '../../scripts/clientUtils';
|
|||
|
||||
const tabControllers = [];
|
||||
const renderedTabs = [];
|
||||
view.addEventListener('viewshow', function (e) {
|
||||
view.addEventListener('viewshow', function () {
|
||||
initTabs();
|
||||
if (!view.getAttribute('data-title')) {
|
||||
const parentId = params.topParentId;
|
||||
|
@ -391,10 +391,10 @@ import Dashboard from '../../scripts/clientUtils';
|
|||
|
||||
inputManager.on(window, onInputCommand);
|
||||
});
|
||||
view.addEventListener('viewbeforehide', function (e) {
|
||||
view.addEventListener('viewbeforehide', function () {
|
||||
inputManager.off(window, onInputCommand);
|
||||
});
|
||||
view.addEventListener('viewdestroy', function (e) {
|
||||
view.addEventListener('viewdestroy', function () {
|
||||
tabControllers.forEach(function (t) {
|
||||
if (t.destroy) {
|
||||
t.destroy();
|
||||
|
|
|
@ -2,17 +2,17 @@ import remotecontrolFactory from '../../../components/remotecontrol/remotecontro
|
|||
import libraryMenu from '../../../scripts/libraryMenu';
|
||||
import '../../../elements/emby-button/emby-button';
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
const remoteControl = new remotecontrolFactory();
|
||||
remoteControl.init(view, view.querySelector('.remoteControlContent'));
|
||||
view.addEventListener('viewshow', function (e) {
|
||||
view.addEventListener('viewshow', function () {
|
||||
libraryMenu.setTransparentMenu(true);
|
||||
|
||||
if (remoteControl) {
|
||||
remoteControl.onShow();
|
||||
}
|
||||
});
|
||||
view.addEventListener('viewbeforehide', function (e) {
|
||||
view.addEventListener('viewbeforehide', function () {
|
||||
libraryMenu.setTransparentMenu(false);
|
||||
|
||||
if (remoteControl) {
|
||||
|
|
|
@ -28,7 +28,7 @@ import { appRouter } from '../../../components/appRouter';
|
|||
return document.querySelector('.dialogContainer .dialog.opened');
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
function getDisplayItem(item) {
|
||||
if (item.Type === 'TvChannel') {
|
||||
const apiClient = ServerConnections.getApiClient(item.ServerId);
|
||||
|
@ -431,13 +431,13 @@ import { appRouter } from '../../../components/appRouter';
|
|||
}
|
||||
}
|
||||
|
||||
function onPlayPauseStateChanged(e) {
|
||||
function onPlayPauseStateChanged() {
|
||||
if (isEnabled) {
|
||||
updatePlayPauseState(this.paused());
|
||||
}
|
||||
}
|
||||
|
||||
function onVolumeChanged(e) {
|
||||
function onVolumeChanged() {
|
||||
if (isEnabled) {
|
||||
const player = this;
|
||||
updatePlayerVolumeState(player, player.isMuted(), player.getVolume());
|
||||
|
@ -472,7 +472,7 @@ import { appRouter } from '../../../components/appRouter';
|
|||
}
|
||||
}
|
||||
|
||||
function onMediaStreamsChanged(e) {
|
||||
function onMediaStreamsChanged() {
|
||||
const player = this;
|
||||
const state = playbackManager.getPlayerState(player);
|
||||
onStateChanged.call(player, {
|
||||
|
@ -534,7 +534,7 @@ import { appRouter } from '../../../components/appRouter';
|
|||
}
|
||||
}
|
||||
|
||||
function onTimeUpdate(e) {
|
||||
function onTimeUpdate() {
|
||||
// Test for 'currentItem' is required for Firefox since its player spams 'timeupdate' events even being at breakpoint
|
||||
if (isEnabled && currentItem) {
|
||||
const now = new Date().getTime();
|
||||
|
@ -794,7 +794,7 @@ import { appRouter } from '../../../components/appRouter';
|
|||
}
|
||||
}
|
||||
|
||||
function updatePlaylist(player) {
|
||||
function updatePlaylist() {
|
||||
const btnPreviousTrack = view.querySelector('.btnPreviousTrack');
|
||||
const btnNextTrack = view.querySelector('.btnNextTrack');
|
||||
btnPreviousTrack.classList.remove('hide');
|
||||
|
@ -818,7 +818,7 @@ import { appRouter } from '../../../components/appRouter';
|
|||
elem.innerHTML = html;
|
||||
}
|
||||
|
||||
function onSettingsButtonClick(e) {
|
||||
function onSettingsButtonClick() {
|
||||
const btn = this;
|
||||
|
||||
import('../../../components/playback/playersettingsmenu').then((playerSettingsMenu) => {
|
||||
|
@ -1261,11 +1261,11 @@ import { appRouter } from '../../../components/appRouter';
|
|||
nowPlayingPositionSlider.classList.add('focusable');
|
||||
}
|
||||
|
||||
view.addEventListener('viewbeforeshow', function (e) {
|
||||
view.addEventListener('viewbeforeshow', function () {
|
||||
headerElement.classList.add('osdHeader');
|
||||
appRouter.setTransparency('full');
|
||||
});
|
||||
view.addEventListener('viewshow', function (e) {
|
||||
view.addEventListener('viewshow', function () {
|
||||
try {
|
||||
Events.on(playbackManager, 'playerchange', onPlayerChange);
|
||||
bindToPlayer(playbackManager.getCurrentPlayer());
|
||||
|
|
|
@ -49,7 +49,7 @@ import ServerConnections from '../../../components/ServerConnections';
|
|||
});
|
||||
}
|
||||
|
||||
export default function(view, params) {
|
||||
export default function(view) {
|
||||
view.querySelector('.addServerForm').addEventListener('submit', onServerSubmit);
|
||||
view.querySelector('.btnCancel').addEventListener('click', goBack);
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import Dashboard from '../../../scripts/clientUtils';
|
|||
}
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
function onSubmit(e) {
|
||||
ApiClient.ajax({
|
||||
type: 'POST',
|
||||
|
|
|
@ -250,7 +250,7 @@ import cardBuilder from '../../../components/cardbuilder/cardBuilder';
|
|||
Dashboard.selectServer();
|
||||
});
|
||||
|
||||
view.addEventListener('viewshow', function (e) {
|
||||
view.addEventListener('viewshow', function () {
|
||||
loading.show();
|
||||
libraryMenu.setTransparentMenu(true);
|
||||
|
||||
|
@ -285,7 +285,7 @@ import cardBuilder from '../../../components/cardbuilder/cardBuilder';
|
|||
view.querySelector('.disclaimer').textContent = options.LoginDisclaimer || '';
|
||||
});
|
||||
});
|
||||
view.addEventListener('viewhide', function (e) {
|
||||
view.addEventListener('viewhide', function () {
|
||||
libraryMenu.setTransparentMenu(false);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ import Dashboard from '../../../scripts/clientUtils';
|
|||
});
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
function onSubmit(e) {
|
||||
ApiClient.ajax({
|
||||
type: 'POST',
|
||||
|
|
|
@ -354,7 +354,7 @@ import autoFocuser from '../../components/autoFocuser';
|
|||
|
||||
const tabControllers = [];
|
||||
let renderedTabs = [];
|
||||
view.addEventListener('viewshow', function (e) {
|
||||
view.addEventListener('viewshow', function () {
|
||||
initTabs();
|
||||
if (!view.getAttribute('data-title')) {
|
||||
const parentId = params.topParentId;
|
||||
|
@ -374,12 +374,12 @@ import autoFocuser from '../../components/autoFocuser';
|
|||
Events.on(ApiClient, 'message', onWebSocketMessage);
|
||||
inputManager.on(window, onInputCommand);
|
||||
});
|
||||
view.addEventListener('viewbeforehide', function (e) {
|
||||
view.addEventListener('viewbeforehide', function () {
|
||||
inputManager.off(window, onInputCommand);
|
||||
Events.off(playbackManager, 'playbackstop', onPlaybackStop);
|
||||
Events.off(ApiClient, 'message', onWebSocketMessage);
|
||||
});
|
||||
view.addEventListener('viewdestroy', function (e) {
|
||||
view.addEventListener('viewdestroy', function () {
|
||||
tabControllers.forEach(function (t) {
|
||||
if (t.destroy) {
|
||||
t.destroy();
|
||||
|
|
|
@ -9,7 +9,6 @@ import autoFocuser from '../../../components/autoFocuser';
|
|||
|
||||
export default function (view, params) {
|
||||
let settingsInstance;
|
||||
let hasChanges;
|
||||
|
||||
const userId = params.userId || ApiClient.getCurrentUserId();
|
||||
const currentSettings = userId === ApiClient.getCurrentUserId() ? userSettings : new UserSettings();
|
||||
|
@ -30,10 +29,6 @@ import autoFocuser from '../../../components/autoFocuser';
|
|||
}
|
||||
});
|
||||
|
||||
view.addEventListener('change', function () {
|
||||
hasChanges = true;
|
||||
});
|
||||
|
||||
view.addEventListener('viewdestroy', function () {
|
||||
if (settingsInstance) {
|
||||
settingsInstance.destroy();
|
||||
|
|
|
@ -10,7 +10,6 @@ import '../../../components/listview/listview.scss';
|
|||
|
||||
export default function (view, params) {
|
||||
let homescreenSettingsInstance;
|
||||
let hasChanges;
|
||||
|
||||
const userId = params.userId || ApiClient.getCurrentUserId();
|
||||
const currentSettings = userId === ApiClient.getCurrentUserId() ? userSettings : new UserSettings();
|
||||
|
@ -31,10 +30,6 @@ import '../../../components/listview/listview.scss';
|
|||
}
|
||||
});
|
||||
|
||||
view.addEventListener('change', function () {
|
||||
hasChanges = true;
|
||||
});
|
||||
|
||||
view.addEventListener('viewdestroy', function () {
|
||||
if (homescreenSettingsInstance) {
|
||||
homescreenSettingsInstance.destroy();
|
||||
|
|
|
@ -11,7 +11,6 @@ import '../../../components/listview/listview.scss';
|
|||
|
||||
export default function (view, params) {
|
||||
let settingsInstance;
|
||||
let hasChanges;
|
||||
|
||||
const userId = params.userId || ApiClient.getCurrentUserId();
|
||||
const currentSettings = userId === ApiClient.getCurrentUserId() ? userSettings : new UserSettings();
|
||||
|
@ -32,10 +31,6 @@ import '../../../components/listview/listview.scss';
|
|||
}
|
||||
});
|
||||
|
||||
view.addEventListener('change', function () {
|
||||
hasChanges = true;
|
||||
});
|
||||
|
||||
view.addEventListener('viewdestroy', function () {
|
||||
if (settingsInstance) {
|
||||
settingsInstance.destroy();
|
||||
|
|
|
@ -54,7 +54,7 @@ function onFileReaderError(evt) {
|
|||
}
|
||||
}
|
||||
|
||||
function onFileReaderAbort(evt) {
|
||||
function onFileReaderAbort() {
|
||||
loading.hide();
|
||||
toast(globalize.translate('FileReadCancelled'));
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ export default function (view, params) {
|
|||
});
|
||||
});
|
||||
});
|
||||
view.querySelector('#btnAddImage').addEventListener('click', function (evt) {
|
||||
view.querySelector('#btnAddImage').addEventListener('click', function () {
|
||||
view.querySelector('#uploadImage').click();
|
||||
});
|
||||
view.querySelector('#uploadImage').addEventListener('change', function (evt) {
|
||||
|
|
|
@ -9,7 +9,6 @@ import autoFocuser from '../../../components/autoFocuser';
|
|||
|
||||
export default function (view, params) {
|
||||
let subtitleSettingsInstance;
|
||||
let hasChanges;
|
||||
|
||||
const userId = params.userId || ApiClient.getCurrentUserId();
|
||||
const currentSettings = userId === ApiClient.getCurrentUserId() ? userSettings : new UserSettings();
|
||||
|
@ -30,10 +29,6 @@ import autoFocuser from '../../../components/autoFocuser';
|
|||
}
|
||||
});
|
||||
|
||||
view.addEventListener('change', function () {
|
||||
hasChanges = true;
|
||||
});
|
||||
|
||||
view.addEventListener('viewdestroy', function () {
|
||||
if (subtitleSettingsInstance) {
|
||||
subtitleSettingsInstance.destroy();
|
||||
|
|
|
@ -11,6 +11,6 @@ function onFinish() {
|
|||
});
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
view.querySelector('.btnWizardNext').addEventListener('click', onFinish);
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ function onSubmit(e) {
|
|||
return false;
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
view.querySelector('.wizardSettingsForm').addEventListener('submit', onSubmit);
|
||||
view.addEventListener('viewshow', function () {
|
||||
document.querySelector('.skinHeader').classList.add('noHomeButtonHeader');
|
||||
|
|
|
@ -75,7 +75,7 @@ function onSubmit(e) {
|
|||
return false;
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
view.querySelector('.wizardSettingsForm').addEventListener('submit', onSubmit);
|
||||
view.addEventListener('viewshow', function () {
|
||||
document.querySelector('.skinHeader').classList.add('noHomeButtonHeader');
|
||||
|
|
|
@ -32,7 +32,7 @@ function onSubmit() {
|
|||
return false;
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
$('.wizardStartForm', view).on('submit', onSubmit);
|
||||
view.addEventListener('viewshow', function () {
|
||||
document.querySelector('.skinHeader').classList.add('noHomeButtonHeader');
|
||||
|
|
|
@ -58,7 +58,7 @@ function onViewShow() {
|
|||
});
|
||||
}
|
||||
|
||||
export default function (view, params) {
|
||||
export default function (view) {
|
||||
view.querySelector('.wizardUserForm').addEventListener('submit', onSubmit);
|
||||
view.addEventListener('viewshow', function () {
|
||||
document.querySelector('.skinHeader').classList.add('noHomeButtonHeader');
|
||||
|
|
|
@ -54,7 +54,7 @@ import '../emby-button/emby-button';
|
|||
});
|
||||
}
|
||||
|
||||
function onButtonClick(e) {
|
||||
function onButtonClick() {
|
||||
const button = this;
|
||||
const collapseContent = button.parentNode.querySelector('.collapseContent');
|
||||
|
||||
|
|
|
@ -188,7 +188,7 @@ import Sortable from 'sortablejs';
|
|||
});
|
||||
}
|
||||
|
||||
function onSeriesTimerCreated(e, apiClient, data) {
|
||||
function onSeriesTimerCreated() {
|
||||
const itemsContainer = this;
|
||||
if (getEventsToMonitor(itemsContainer).indexOf('seriestimers') !== -1) {
|
||||
itemsContainer.notifyRefreshNeeded();
|
||||
|
|
|
@ -20,7 +20,7 @@ import ServerConnections from '../../components/ServerConnections';
|
|||
}
|
||||
}
|
||||
|
||||
function onClick(e) {
|
||||
function onClick() {
|
||||
const button = this;
|
||||
const id = button.getAttribute('data-id');
|
||||
const serverId = button.getAttribute('data-serverid');
|
||||
|
|
|
@ -15,7 +15,7 @@ import template from './emby-progressring.template.html';
|
|||
if (window.MutationObserver) {
|
||||
// create an observer instance
|
||||
const observer = new MutationObserver(function (mutations) {
|
||||
mutations.forEach(function (mutation) {
|
||||
mutations.forEach(function () {
|
||||
instance.setProgress(parseFloat(instance.getAttribute('data-progress') || '0'));
|
||||
});
|
||||
});
|
||||
|
|
|
@ -24,7 +24,7 @@ import ServerConnections from '../../components/ServerConnections';
|
|||
return apiClient.updateFavoriteStatus(apiClient.getCurrentUserId(), itemId, !isFavorite);
|
||||
}
|
||||
|
||||
function onClick(e) {
|
||||
function onClick() {
|
||||
const button = this;
|
||||
const id = button.getAttribute('data-id');
|
||||
const serverId = button.getAttribute('data-serverid');
|
||||
|
|
|
@ -57,7 +57,7 @@ const EmbyScrollButtonsPrototype = Object.create(HTMLDivElement.prototype);
|
|||
}
|
||||
}
|
||||
|
||||
function onScroll(e) {
|
||||
function onScroll() {
|
||||
const scrollButtons = this;
|
||||
const scroller = this.scroller;
|
||||
|
||||
|
@ -117,7 +117,7 @@ const EmbyScrollButtonsPrototype = Object.create(HTMLDivElement.prototype);
|
|||
return scrollSize;
|
||||
}
|
||||
|
||||
function onScrollButtonClick(e) {
|
||||
function onScrollButtonClick() {
|
||||
const scroller = this.parentNode.nextSibling;
|
||||
|
||||
const direction = this.getAttribute('data-direction');
|
||||
|
|
|
@ -63,14 +63,14 @@ import 'webcomponents.js/webcomponents-lite';
|
|||
return elem;
|
||||
}
|
||||
|
||||
function onFocus(e) {
|
||||
function onFocus() {
|
||||
const label = getLabel(this);
|
||||
if (label) {
|
||||
label.classList.add('selectLabelFocused');
|
||||
}
|
||||
}
|
||||
|
||||
function onBlur(e) {
|
||||
function onBlur() {
|
||||
const label = getLabel(this);
|
||||
if (label) {
|
||||
label.classList.remove('selectLabelFocused');
|
||||
|
|
|
@ -105,7 +105,7 @@ import '../emby-input/emby-input';
|
|||
});
|
||||
}
|
||||
|
||||
function updateBubble(range, value, bubble, bubbleText) {
|
||||
function updateBubble(range, value, bubble) {
|
||||
requestAnimationFrame(function () {
|
||||
const bubbleTrackRect = range.sliderBubbleTrack.getBoundingClientRect();
|
||||
const bubbleRect = bubble.getBoundingClientRect();
|
||||
|
@ -189,7 +189,7 @@ import '../emby-input/emby-input';
|
|||
|
||||
let hasHideClass = sliderBubble.classList.contains('hide');
|
||||
|
||||
dom.addEventListener(this, 'input', function (e) {
|
||||
dom.addEventListener(this, 'input', function () {
|
||||
this.dragging = true;
|
||||
|
||||
if (this.dataset.sliderKeepProgress !== 'true') {
|
||||
|
@ -284,7 +284,7 @@ import '../emby-input/emby-input';
|
|||
passive: true
|
||||
});
|
||||
|
||||
dom.addEventListener(this, 'touchend', function (e) {
|
||||
dom.addEventListener(this, 'touchend', function () {
|
||||
const range = this;
|
||||
|
||||
setTimeout(function () {
|
||||
|
|
|
@ -15,7 +15,7 @@ import '../../assets/css/scrollstyles.scss';
|
|||
newButton.classList.add(activeButtonClass);
|
||||
}
|
||||
|
||||
function getTabPanel(tabs, index) {
|
||||
function getTabPanel() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -291,13 +291,13 @@ import '../../assets/css/scrollstyles.scss';
|
|||
}
|
||||
};
|
||||
|
||||
EmbyTabs.triggerBeforeTabChange = function (selected) {
|
||||
EmbyTabs.triggerBeforeTabChange = function () {
|
||||
const tabs = this;
|
||||
|
||||
triggerBeforeTabChange(tabs, tabs.selectedIndex());
|
||||
};
|
||||
|
||||
EmbyTabs.triggerTabChange = function (selected) {
|
||||
EmbyTabs.triggerTabChange = function () {
|
||||
const tabs = this;
|
||||
|
||||
tabs.dispatchEvent(new CustomEvent('tabchange', {
|
||||
|
|
|
@ -428,7 +428,7 @@ class CastPlayer {
|
|||
/**
|
||||
* Callback function for media command success
|
||||
*/
|
||||
mediaCommandSuccessCallback(info, e) {
|
||||
mediaCommandSuccessCallback(info) {
|
||||
console.debug(info);
|
||||
}
|
||||
}
|
||||
|
@ -507,7 +507,7 @@ function initializeChromecast() {
|
|||
}
|
||||
}));
|
||||
|
||||
Events.on(instance._castPlayer, 'connect', function (e) {
|
||||
Events.on(instance._castPlayer, 'connect', function () {
|
||||
if (currentResolve) {
|
||||
sendConnectionResult(true);
|
||||
} else {
|
||||
|
@ -579,7 +579,7 @@ class ChromecastPlayer {
|
|||
new castSenderApiLoader().load().then(initializeChromecast.bind(this));
|
||||
}
|
||||
|
||||
tryPair(target) {
|
||||
tryPair() {
|
||||
const castPlayer = this._castPlayer;
|
||||
|
||||
if (castPlayer.deviceState !== DEVICE_STATE.ACTIVE && castPlayer.isInitialized) {
|
||||
|
@ -1058,11 +1058,11 @@ class ChromecastPlayer {
|
|||
getCurrentPlaylistItemId() {
|
||||
}
|
||||
|
||||
setCurrentPlaylistItem(playlistItemId) {
|
||||
setCurrentPlaylistItem() {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
removeFromPlaylist(playlistItemIds) {
|
||||
removeFromPlaylist() {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
|
|
|
@ -135,7 +135,7 @@ class HtmlAudioPlayer {
|
|||
|
||||
const hls = new Hls({
|
||||
manifestLoadingTimeOut: 20000,
|
||||
xhrSetup: function (xhr, url) {
|
||||
xhrSetup: function (xhr) {
|
||||
xhr.withCredentials = includeCorsCredentials;
|
||||
}
|
||||
});
|
||||
|
@ -280,7 +280,7 @@ class HtmlAudioPlayer {
|
|||
Events.trigger(self, 'playing');
|
||||
}
|
||||
|
||||
function onPlay(e) {
|
||||
function onPlay() {
|
||||
Events.trigger(self, 'unpause');
|
||||
}
|
||||
|
||||
|
@ -365,7 +365,7 @@ class HtmlAudioPlayer {
|
|||
}
|
||||
}
|
||||
|
||||
duration(val) {
|
||||
duration() {
|
||||
const mediaElement = this._mediaElement;
|
||||
if (mediaElement) {
|
||||
const duration = mediaElement.duration;
|
||||
|
|
|
@ -189,7 +189,7 @@ export class PdfPlayer {
|
|||
const serverId = item.ServerId;
|
||||
const apiClient = ServerConnections.getApiClient(serverId);
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve) => {
|
||||
const downloadHref = apiClient.getItemDownloadUrl(item.Id);
|
||||
|
||||
this.bindEvents();
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue