mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add plugin types
This commit is contained in:
parent
ecb84ff351
commit
64ecc3eae7
18 changed files with 51 additions and 20 deletions
|
@ -8,6 +8,7 @@ import datetime from '../../scripts/datetime';
|
|||
import globalize from '../../scripts/globalize';
|
||||
import loading from '../loading/loading';
|
||||
import skinManager from '../../scripts/themeManager';
|
||||
import { PluginType } from '../../types/plugin.ts';
|
||||
import Events from '../../utils/events.ts';
|
||||
import '../../elements/emby-select/emby-select';
|
||||
import '../../elements/emby-checkbox/emby-checkbox';
|
||||
|
@ -35,7 +36,7 @@ import template from './displaySettings.template.html';
|
|||
|
||||
function loadScreensavers(context, userSettings) {
|
||||
const selectScreensaver = context.querySelector('.selectScreensaver');
|
||||
const options = pluginManager.ofType('screensaver').map(plugin => {
|
||||
const options = pluginManager.ofType(PluginType.Screensaver).map(plugin => {
|
||||
return {
|
||||
name: plugin.name,
|
||||
value: plugin.id
|
||||
|
|
|
@ -11,6 +11,7 @@ import { appHost } from '../apphost';
|
|||
import Screenfull from 'screenfull';
|
||||
import ServerConnections from '../ServerConnections';
|
||||
import alert from '../alert';
|
||||
import { PluginType } from '../../types/plugin.ts';
|
||||
import { includesAny } from '../../utils/container.ts';
|
||||
|
||||
const UNLIMITED_ITEMS = -1;
|
||||
|
@ -2268,7 +2269,7 @@ class PlaybackManager {
|
|||
|
||||
function runInterceptors(item, playOptions) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
const interceptors = pluginManager.ofType('preplayintercept');
|
||||
const interceptors = pluginManager.ofType(PluginType.PreplayIntercept);
|
||||
|
||||
interceptors.sort(function (a, b) {
|
||||
return (a.order || 0) - (b.order || 0);
|
||||
|
@ -3387,12 +3388,12 @@ class PlaybackManager {
|
|||
}
|
||||
|
||||
Events.on(pluginManager, 'registered', function (e, plugin) {
|
||||
if (plugin.type === 'mediaplayer') {
|
||||
if (plugin.type === PluginType.MediaPlayer) {
|
||||
initMediaPlayer(plugin);
|
||||
}
|
||||
});
|
||||
|
||||
pluginManager.ofType('mediaplayer').forEach(initMediaPlayer);
|
||||
pluginManager.ofType(PluginType.MediaPlayer).forEach(initMediaPlayer);
|
||||
|
||||
function sendProgressUpdate(player, progressEventName, reportPlaylist) {
|
||||
if (!player) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue