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

Merge pull request #4401 from thornbill/add-plugin-types

Add plugin types
This commit is contained in:
Bill Thornton 2023-03-10 15:23:06 -05:00 committed by GitHub
commit 0cec50c6aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 53 additions and 21 deletions

View file

@ -16,6 +16,7 @@ import imageHelper from './imagehelper';
import { getMenuLinks } from '../scripts/settings/webSettings';
import Dashboard, { pageClassOn } from '../utils/dashboard';
import ServerConnections from '../components/ServerConnections';
import { PluginType } from '../types/plugin.ts';
import Events from '../utils/events.ts';
import { getParameterByName } from '../utils/url.ts';
@ -159,7 +160,7 @@ import '../styles/flexstyles.scss';
// Button is present
headerSyncButton
// SyncPlay plugin is loaded
&& pluginManager.plugins.filter(plugin => plugin.id === 'syncplay').length > 0
&& pluginManager.ofType(PluginType.SyncPlay).length > 0
// SyncPlay enabled for user
&& policy?.SyncPlayAccess !== 'None'
) {

View file

@ -3,6 +3,7 @@ import { pluginManager } from '../components/pluginManager';
import inputManager from './inputManager';
import * as userSettings from './settings/userSettings';
import ServerConnections from '../components/ServerConnections';
import { PluginType } from '../types/plugin.ts';
import Events from '../utils/events.ts';
import './screensavermanager.scss';
@ -34,7 +35,7 @@ function getScreensaverPlugin(isLoggedIn) {
option = isLoggedIn ? 'backdropscreensaver' : 'logoscreensaver';
}
const plugins = pluginManager.ofType('screensaver');
const plugins = pluginManager.ofType(PluginType.Screensaver);
for (const plugin of plugins) {
if (plugin.id === option) {