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

Replace apiclient event bus with local version

This commit is contained in:
Bill Thornton 2022-10-14 10:53:16 -04:00
parent dabeda3fdd
commit 0a0e45d155
84 changed files with 159 additions and 91 deletions

View file

@ -1,7 +1,8 @@
import { ConnectionManager, Credentials, ApiClient, Events } from 'jellyfin-apiclient';
import { ConnectionManager, Credentials, ApiClient } from 'jellyfin-apiclient';
import { appHost } from './apphost';
import Dashboard from '../utils/dashboard';
import Events from '../utils/events.ts';
import { setUserInfo } from '../scripts/settings/userSettings';
import appSettings from '../scripts/settings/appSettings';

View file

@ -1,5 +1,5 @@
import escapeHtml from 'escape-html';
import { Events } from 'jellyfin-apiclient';
import Events from '../utils/events.ts';
import globalize from '../scripts/globalize';
import dom from '../scripts/dom';
import * as datefns from 'date-fns';

View file

@ -1,9 +1,9 @@
import { Events } from 'jellyfin-apiclient';
import { Action, createHashHistory } from 'history';
import { appHost } from './apphost';
import { clearBackdrop, setBackdropTransparency } from './backdrop/backdrop';
import globalize from '../scripts/globalize';
import Events from '../utils/events.ts';
import itemHelper from './itemHelper';
import loading from './loading/loading';
import viewManager from './viewManager/viewManager';

View file

@ -1,7 +1,7 @@
import Package from '../../package.json';
import appSettings from '../scripts/settings/appSettings';
import browser from '../scripts/browser';
import { Events } from 'jellyfin-apiclient';
import Events from '../utils/events.ts';
import * as htmlMediaHelper from '../components/htmlMediaHelper';
import * as webSettings from '../scripts/settings/webSettings';
import globalize from '../scripts/globalize';

View file

@ -8,7 +8,7 @@ import datetime from '../../scripts/datetime';
import globalize from '../../scripts/globalize';
import loading from '../loading/loading';
import skinManager from '../../scripts/themeManager';
import { Events } from 'jellyfin-apiclient';
import Events from '../../utils/events.ts';
import '../../elements/emby-select/emby-select';
import '../../elements/emby-checkbox/emby-checkbox';
import '../../elements/emby-button/emby-button';

View file

@ -1,7 +1,7 @@
import dom from '../../scripts/dom';
import dialogHelper from '../dialogHelper/dialogHelper';
import globalize from '../../scripts/globalize';
import { Events } from 'jellyfin-apiclient';
import Events from '../../utils/events.ts';
import '../../elements/emby-checkbox/emby-checkbox';
import '../../elements/emby-collapse/emby-collapse';
import './style.scss';

View file

@ -2,7 +2,7 @@ import escapeHtml from 'escape-html';
import inputManager from '../../scripts/inputManager';
import browser from '../../scripts/browser';
import globalize from '../../scripts/globalize';
import { Events } from 'jellyfin-apiclient';
import Events from '../../utils/events.ts';
import scrollHelper from '../../scripts/scrollHelper';
import serverNotifications from '../../scripts/serverNotifications';
import loading from '../loading/loading';

View file

@ -4,7 +4,7 @@ import layoutManager from '../layoutManager';
import focusManager from '../focusManager';
import globalize from '../../scripts/globalize';
import loading from '../loading/loading';
import { Events } from 'jellyfin-apiclient';
import Events from '../../utils/events.ts';
import homeSections from '../homesections/homesections';
import dom from '../../scripts/dom';
import '../listview/listview.scss';

View file

@ -3,7 +3,7 @@
import appSettings from '../scripts/settings/appSettings' ;
import browser from '../scripts/browser';
import { Events } from 'jellyfin-apiclient';
import Events from '../utils/events.ts';
export function getSavedVolume() {
return appSettings.get('volume') || 1;

View file

@ -1,6 +1,6 @@
import { playbackManager } from './playback/playbackmanager';
import serverNotifications from '../scripts/serverNotifications';
import { Events } from 'jellyfin-apiclient';
import Events from '../utils/events.ts';
function onUserDataChanged() {
const instance = this;

View file

@ -2,7 +2,7 @@
import { appHost } from './apphost';
import browser from '../scripts/browser';
import appSettings from '../scripts/settings/appSettings';
import { Events } from 'jellyfin-apiclient';
import Events from '../utils/events.ts';
function setLayout(instance, layout, selectedLayout) {
if (layout === selectedLayout) {

View file

@ -1,6 +1,6 @@
import dom from '../scripts/dom';
import browser from '../scripts/browser';
import { Events } from 'jellyfin-apiclient';
import Events from '../utils/events.ts';
import '../elements/emby-tabs/emby-tabs';
import '../elements/emby-button/emby-button';

View file

@ -1,6 +1,6 @@
import serverNotifications from '../../scripts/serverNotifications';
import { playbackManager } from '../playback/playbackmanager';
import { Events } from 'jellyfin-apiclient';
import Events from '../../utils/events.ts';
import globalize from '../../scripts/globalize';
import NotificationIcon from './notificationicon.png';

View file

@ -1,5 +1,5 @@
import datetime from '../../scripts/datetime';
import { Events } from 'jellyfin-apiclient';
import Events from '../../utils/events.ts';
import browser from '../../scripts/browser';
import imageLoader from '../images/imageLoader';
import layoutManager from '../layoutManager';

View file

@ -1,7 +1,8 @@
import { Events } from 'jellyfin-apiclient';
import { playbackManager } from './playbackmanager';
import dom from '../../scripts/dom';
import browser from '../../scripts/browser';
import Events from '../../utils/events.ts';
import './iconosd.scss';
import 'material-design-icons-iconfont';

View file

@ -1,6 +1,6 @@
import { playbackManager } from '../playback/playbackmanager';
import nowPlayingHelper from '../playback/nowplayinghelper';
import { Events } from 'jellyfin-apiclient';
import Events from '../../utils/events.ts';
import ServerConnections from '../ServerConnections';
import shell from '../../scripts/shell';

View file

@ -1,4 +1,4 @@
import { Events } from 'jellyfin-apiclient';
import Events from '../../utils/events.ts';
import datetime from '../../scripts/datetime';
import appSettings from '../../scripts/settings/appSettings';
import itemHelper from '../itemHelper';

View file

@ -1,7 +1,7 @@
import { playbackManager } from './playbackmanager';
import layoutManager from '../layoutManager';
import { Events } from 'jellyfin-apiclient';
import Events from '../../utils/events.ts';
let orientationLocked;

View file

@ -1,5 +1,5 @@
import appSettings from '../../scripts/settings/appSettings';
import { Events } from 'jellyfin-apiclient';
import Events from '../../utils/events.ts';
import browser from '../../scripts/browser';
import loading from '../loading/loading';
import { playbackManager } from '../playback/playbackmanager';

View file

@ -1,5 +1,5 @@
import { Events } from 'jellyfin-apiclient';
import { playbackManager } from '../playback/playbackmanager';
import Events from '../../utils/events.ts';
function transferPlayback(oldPlayer, newPlayer) {
const state = playbackManager.getPlayerState(oldPlayer);

View file

@ -1,8 +1,9 @@
import { Events } from 'jellyfin-apiclient';
import { playbackManager } from './playbackmanager';
import dom from '../../scripts/dom';
import browser from '../../scripts/browser';
import Events from '../../utils/events.ts';
import './iconosd.scss';
import 'material-design-icons-iconfont';

View file

@ -5,7 +5,7 @@ import focusManager from '../focusManager';
import qualityoptions from '../qualityOptions';
import globalize from '../../scripts/globalize';
import loading from '../loading/loading';
import { Events } from 'jellyfin-apiclient';
import Events from '../../utils/events.ts';
import '../../elements/emby-select/emby-select';
import '../../elements/emby-checkbox/emby-checkbox';
import ServerConnections from '../ServerConnections';

View file

@ -1,6 +1,6 @@
import { Events } from 'jellyfin-apiclient';
import '../../elements/emby-button/paper-icon-button-light';
import globalize from '../../scripts/globalize';
import Events from '../../utils/events.ts';
import layoutManager from '../layoutManager';
import { playbackManager } from '../playback/playbackmanager';
import playMethodHelper from '../playback/playmethodhelper';

View file

@ -1,4 +1,4 @@
import { Events } from 'jellyfin-apiclient';
import Events from '../utils/events.ts';
import globalize from '../scripts/globalize';
import loading from './loading/loading';
import appSettings from '../scripts/settings/appSettings';

View file

@ -7,7 +7,7 @@ import scrollHelper from '../../scripts/scrollHelper';
import datetime from '../../scripts/datetime';
import imageLoader from '../images/imageLoader';
import recordingFields from './recordingfields';
import { Events } from 'jellyfin-apiclient';
import Events from '../../utils/events.ts';
import '../../elements/emby-button/emby-button';
import '../../elements/emby-button/paper-icon-button-light';
import '../../elements/emby-checkbox/emby-checkbox';

View file

@ -1,5 +1,5 @@
import globalize from '../../scripts/globalize';
import { Events } from 'jellyfin-apiclient';
import Events from '../../utils/events.ts';
import serverNotifications from '../../scripts/serverNotifications';
import loading from '../loading/loading';
import dom from '../../scripts/dom';

View file

@ -5,7 +5,7 @@ import listView from '../listview/listview';
import imageLoader from '../images/imageLoader';
import { playbackManager } from '../playback/playbackmanager';
import nowPlayingHelper from '../playback/nowplayinghelper';
import { Events } from 'jellyfin-apiclient';
import Events from '../../utils/events.ts';
import { appHost } from '../apphost';
import globalize from '../../scripts/globalize';
import layoutManager from '../layoutManager';

View file

@ -1,6 +1,6 @@
import type { BaseItemDto } from '@jellyfin/sdk/lib/generated-client';
import type { ApiClient } from 'jellyfin-apiclient';
import classNames from 'classnames';
import { ApiClient } from 'jellyfin-apiclient';
import React, { FunctionComponent, useEffect, useState } from 'react';
import globalize from '../../scripts/globalize';

View file

@ -1,6 +1,6 @@
import type { BaseItemDto } from '@jellyfin/sdk/lib/generated-client';
import type { ApiClient } from 'jellyfin-apiclient';
import classNames from 'classnames';
import { ApiClient } from 'jellyfin-apiclient';
import React, { FunctionComponent, useEffect, useState } from 'react';
import globalize from '../../scripts/globalize';

View file

@ -7,7 +7,7 @@ import loading from '../loading/loading';
import subtitleAppearanceHelper from './subtitleappearancehelper';
import settingsHelper from '../settingshelper';
import dom from '../../scripts/dom';
import { Events } from 'jellyfin-apiclient';
import Events from '../../utils/events.ts';
import '../listview/listview.scss';
import '../../elements/emby-select/emby-select';
import '../../elements/emby-slider/emby-slider';

View file

@ -1,6 +1,6 @@
import { playbackManager } from './playback/playbackmanager';
import * as userSettings from '../scripts/settings/userSettings';
import { Events } from 'jellyfin-apiclient';
import Events from '../utils/events.ts';
import ServerConnections from './ServerConnections';
let currentOwnerId;

View file

@ -9,7 +9,7 @@ import '../../elements/emby-select/emby-select';
import '../../elements/emby-button/emby-button';
import '../../assets/css/flexstyles.scss';
import Dashboard from '../../utils/dashboard';
import { Events } from 'jellyfin-apiclient';
import Events from '../../utils/events.ts';
export default function (page, providerId, options) {
function reload() {

View file

@ -6,7 +6,7 @@ import '../../elements/emby-input/emby-input';
import '../listview/listview.scss';
import '../../elements/emby-button/paper-icon-button-light';
import Dashboard from '../../utils/dashboard';
import { Events } from 'jellyfin-apiclient';
import Events from '../../utils/events.ts';
export default function (page, providerId, options) {
function getListingProvider(config, id) {

View file

@ -1,6 +1,6 @@
import dom from '../../scripts/dom';
import { playbackManager } from '../playback/playbackmanager';
import { Events } from 'jellyfin-apiclient';
import Events from '../../utils/events.ts';
import mediaInfo from '../mediainfo/mediainfo';
import layoutManager from '../layoutManager';
import focusManager from '../focusManager';