This commit is contained in:
MrTimscampi
2020-08-16 20:24:45 +02:00
committed by vitorsemeano
parent 96eccd2ecd
commit 7d9208e951
143 changed files with 1000 additions and 1008 deletions
+6 -6
View File
@@ -1,12 +1,12 @@
import { connectionManager, events } from 'jellyfin-apiclient';
import { ConnectionManager, events } from 'jellyfin-apiclient';
import serverNotifications from '../scripts/serverNotifications';
import globalize from '../scripts/globalize';
import '../elements/emby-button/emby-button';
export default function (options) {
function pollTasks() {
window.connectionManager.getApiClient(serverId).getScheduledTasks({
ConnectionManager.getApiClient(serverId).getScheduledTasks({
IsEnabled: true
}).then(updateTasks);
}
@@ -63,7 +63,7 @@ export default function (options) {
}
function onScheduledTaskMessageConfirmed(id) {
window.connectionManager.getApiClient(serverId).startScheduledTask(id).then(pollTasks);
ConnectionManager.getApiClient(serverId).startScheduledTask(id).then(pollTasks);
}
function onButtonClick() {
@@ -81,13 +81,13 @@ export default function (options) {
const serverId = ApiClient.serverId();
function onPollIntervalFired() {
if (!window.connectionManager.getApiClient(serverId).isMessageChannelOpen()) {
if (!ConnectionManager.getApiClient(serverId).isMessageChannelOpen()) {
pollTasks();
}
}
function startInterval() {
const apiClient = window.connectionManager.getApiClient(serverId);
const apiClient = ConnectionManager.getApiClient(serverId);
if (pollInterval) {
clearInterval(pollInterval);
@@ -97,7 +97,7 @@ export default function (options) {
}
function stopInterval() {
window.connectionManager.getApiClient(serverId).sendMessage('ScheduledTasksInfoStop');
ConnectionManager.getApiClient(serverId).sendMessage('ScheduledTasksInfoStop');
if (pollInterval) {
clearInterval(pollInterval);