extracted connectionManager from site.js
new module ServerConnections for ConnectionManager all code adapted to this new module removed Events and ConnectionManager from eslintrc
This commit is contained in:
parent
923d53bb71
commit
5071aedcea
81 changed files with 446 additions and 397 deletions
|
@ -1,5 +1,5 @@
|
|||
import globalize from '../../scripts/globalize';
|
||||
import { ConnectionManager, Events } from 'jellyfin-apiclient';
|
||||
import { Events } from 'jellyfin-apiclient';
|
||||
import serverNotifications from '../../scripts/serverNotifications';
|
||||
import loading from '../loading/loading';
|
||||
import dom from '../../scripts/dom';
|
||||
|
@ -8,6 +8,7 @@ import '../../elements/emby-button/emby-button';
|
|||
import '../../elements/emby-button/paper-icon-button-light';
|
||||
import './recordingfields.css';
|
||||
import '../../assets/css/flexstyles.css';
|
||||
import ServerConnections from '../ServerConnections';
|
||||
|
||||
/*eslint prefer-const: "error"*/
|
||||
|
||||
|
@ -45,7 +46,7 @@ function loadData(parent, program, apiClient) {
|
|||
|
||||
function fetchData(instance) {
|
||||
const options = instance.options;
|
||||
const apiClient = ConnectionManager.getApiClient(options.serverId);
|
||||
const apiClient = ServerConnections.getApiClient(options.serverId);
|
||||
|
||||
options.parent.querySelector('.recordingFields').classList.remove('hide');
|
||||
return apiClient.getLiveTvProgram(options.programId, apiClient.getCurrentUserId()).then(function (program) {
|
||||
|
@ -196,7 +197,7 @@ function onRecordChange(e) {
|
|||
|
||||
const self = this;
|
||||
const options = this.options;
|
||||
const apiClient = ConnectionManager.getApiClient(options.serverId);
|
||||
const apiClient = ServerConnections.getApiClient(options.serverId);
|
||||
|
||||
const button = dom.parentWithTag(e.target, 'BUTTON');
|
||||
const isChecked = !button.querySelector('.material-icons').classList.contains('recordingIcon-active');
|
||||
|
@ -235,7 +236,7 @@ function onRecordSeriesChange(e) {
|
|||
|
||||
const self = this;
|
||||
const options = this.options;
|
||||
const apiClient = ConnectionManager.getApiClient(options.serverId);
|
||||
const apiClient = ServerConnections.getApiClient(options.serverId);
|
||||
|
||||
const button = dom.parentWithTag(e.target, 'BUTTON');
|
||||
const isChecked = !button.querySelector('.material-icons').classList.contains('recordingIcon-active');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue