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

Merge branch 'master' into blurred-pdf-fixed

This commit is contained in:
Zourlo 2023-03-11 10:28:39 +09:00 committed by GitHub
commit 695cdc6953
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
68 changed files with 158 additions and 131 deletions

View file

@ -68,6 +68,7 @@ module.exports = {
'padded-blocks': ['error', 'never'],
'prefer-const': ['error', { 'destructuring': 'all' }],
'quotes': ['error', 'single', { 'avoidEscape': true, 'allowTemplateLiterals': false }],
'radix': ['error'],
'@babel/semi': ['error'],
'space-before-blocks': ['error'],
'space-infix-ops': 'error',

View file

@ -21,11 +21,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Initialize CodeQL
uses: github/codeql-action/init@32dc499307d133bb5085bae78498c0ac2cf762d5 # v2.2.5
uses: github/codeql-action/init@16964e90ba004cdf0cd845b866b5df21038b7723 # v2.2.6
with:
languages: ${{ matrix.language }}
queries: +security-extended
- name: Autobuild
uses: github/codeql-action/autobuild@32dc499307d133bb5085bae78498c0ac2cf762d5 # v2.2.5
uses: github/codeql-action/autobuild@16964e90ba004cdf0cd845b866b5df21038b7723 # v2.2.6
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@32dc499307d133bb5085bae78498c0ac2cf762d5 # v2.2.5
uses: github/codeql-action/analyze@16964e90ba004cdf0cd845b866b5df21038b7723 # v2.2.6

View file

@ -1,4 +1,4 @@
FROM fedora:37
FROM fedora:38
# Docker build arguments
ARG SOURCE_DIR=/jellyfin

View file

@ -19,7 +19,7 @@ import template from './accessSchedule.template.html';
const pct = hours % 1;
if (pct) {
minutes = parseInt(60 * pct);
minutes = parseInt(60 * pct, 10);
}
return datetime.getDisplayTime(new Date(2000, 1, 1, hours, minutes, 0, 0));

View file

@ -64,10 +64,10 @@ import { toBoolean } from '../utils/string.ts';
function reloadData(instance, elem, apiClient, startIndex, limit) {
if (startIndex == null) {
startIndex = parseInt(elem.getAttribute('data-activitystartindex') || '0');
startIndex = parseInt(elem.getAttribute('data-activitystartindex') || '0', 10);
}
limit = limit || parseInt(elem.getAttribute('data-activitylimit') || '7');
limit = limit || parseInt(elem.getAttribute('data-activitylimit') || '7', 10);
const minDate = new Date();
const hasUserId = toBoolean(elem.getAttribute('data-useractivity'), true);

View file

@ -663,7 +663,7 @@ import { appRouter } from '../appRouter';
const character = String(str.slice(charIndex, charIndex + 1).charCodeAt());
let sum = 0;
for (let i = 0; i < character.length; i++) {
sum += parseInt(character.charAt(i));
sum += parseInt(character.charAt(i), 10);
}
const index = String(sum).slice(-1);

View file

@ -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

View file

@ -13,7 +13,7 @@ import ServerConnections from './ServerConnections';
const playedIndicator = card.querySelector('.playedIndicator');
const playedIndicatorHtml = playedIndicator ? playedIndicator.innerHTML : null;
const options = {
Limit: parseInt(playedIndicatorHtml || '10'),
Limit: parseInt(playedIndicatorHtml || '10', 10),
Fields: 'PrimaryImageAspectRatio,DateCreated',
ParentId: itemId,
GroupItems: false

View file

@ -1149,12 +1149,12 @@ function Guide(options) {
guideContext.querySelector('.guideDateTabs').addEventListener('tabchange', function (e) {
const allTabButtons = e.target.querySelectorAll('.guide-date-tab-button');
const tabButton = allTabButtons[parseInt(e.detail.selectedTabIndex)];
const tabButton = allTabButtons[parseInt(e.detail.selectedTabIndex, 10)];
if (tabButton) {
const previousButton = e.detail.previousIndex == null ? null : allTabButtons[parseInt(e.detail.previousIndex)];
const previousButton = e.detail.previousIndex == null ? null : allTabButtons[parseInt(e.detail.previousIndex, 10)];
const date = new Date();
date.setTime(parseInt(tabButton.getAttribute('data-date')));
date.setTime(parseInt(tabButton.getAttribute('data-date'), 10));
const scrollWidth = programGrid.scrollWidth;
let scrollToTimeMs;
@ -1166,7 +1166,7 @@ function Guide(options) {
if (previousButton) {
const previousDate = new Date();
previousDate.setTime(parseInt(previousButton.getAttribute('data-date')));
previousDate.setTime(parseInt(previousButton.getAttribute('data-date'), 10));
scrollToTimeMs += (previousDate.getHours() * 60 * 60 * 1000);
scrollToTimeMs += (previousDate.getMinutes() * 60 * 1000);

View file

@ -278,9 +278,9 @@ import template from './imageeditor.template.html';
const apiClient = ServerConnections.getApiClient(serverId);
const type = imageCard.getAttribute('data-imagetype');
const index = parseInt(imageCard.getAttribute('data-index'));
const providerCount = parseInt(imageCard.getAttribute('data-providers'));
const numImages = parseInt(imageCard.getAttribute('data-numimages'));
const index = parseInt(imageCard.getAttribute('data-index'), 10);
const providerCount = parseInt(imageCard.getAttribute('data-providers'), 10);
const numImages = parseInt(imageCard.getAttribute('data-numimages'), 10);
import('../actionSheet/actionSheet').then(({default: actionSheet}) => {
const commands = [];
@ -385,7 +385,7 @@ import template from './imageeditor.template.html';
addListeners(context, 'btnDeleteImage', 'click', function () {
const type = this.getAttribute('data-imagetype');
let index = this.getAttribute('data-index');
index = index === 'null' ? null : parseInt(index);
index = index === 'null' ? null : parseInt(index, 10);
const apiClient = ServerConnections.getApiClient(currentItem.ServerId);
deleteImage(context, currentItem.Id, type, index, apiClient, true);
});

View file

@ -138,7 +138,7 @@ const attributeDelimiterHtml = layoutManager.tv ? '' : '<span class="hide">: </s
attributes.push(createAttribute(globalize.translate('MediaInfoChannels'), `${stream.Channels} ch`));
}
if (stream.BitRate) {
attributes.push(createAttribute(globalize.translate('MediaInfoBitrate'), `${parseInt(stream.BitRate / 1000)} kbps`));
attributes.push(createAttribute(globalize.translate('MediaInfoBitrate'), `${parseInt(stream.BitRate / 1000, 10)} kbps`));
}
if (stream.SampleRate) {
attributes.push(createAttribute(globalize.translate('MediaInfoSampleRate'), `${stream.SampleRate} Hz`));

View file

@ -52,7 +52,7 @@ import datetime from '../../scripts/datetime';
if (value) {
if (identifyField[i].type === 'number') {
value = parseInt(value);
value = parseInt(value, 10);
}
lookupInfo[identifyField[i].getAttribute('data-lookup')] = value;
@ -123,7 +123,7 @@ import datetime from '../../scripts/datetime';
elem.innerHTML = html;
function onSearchImageClick() {
const index = parseInt(this.getAttribute('data-index'));
const index = parseInt(this.getAttribute('data-index'), 10);
const currentResult = results[index];

View file

@ -531,7 +531,7 @@ import template from './libraryoptionseditor.template.html';
PreferredMetadataLanguage: parent.querySelector('#selectLanguage').value,
MetadataCountryCode: parent.querySelector('#selectCountry').value,
SeasonZeroDisplayName: parent.querySelector('#txtSeasonZeroName').value,
AutomaticRefreshIntervalDays: parseInt(parent.querySelector('#selectAutoRefreshInterval').value),
AutomaticRefreshIntervalDays: parseInt(parent.querySelector('#selectAutoRefreshInterval').value, 10),
EnableEmbeddedTitles: parent.querySelector('#chkEnableEmbeddedTitles').checked,
EnableEmbeddedExtrasTitles: parent.querySelector('#chkEnableEmbeddedExtrasTitles').checked,
EnableEmbeddedEpisodeInfos: parent.querySelector('#chkEnableEmbeddedEpisodeInfos').checked,

View file

@ -168,7 +168,7 @@ import template from './mediaLibraryCreator.template.html';
function onRemoveClick(e) {
const button = dom.parentWithClass(e.target, 'btnRemovePath');
const index = parseInt(button.getAttribute('data-index'));
const index = parseInt(button.getAttribute('data-index'), 10);
const location = pathInfos[index].Path;
const locationLower = location.toLowerCase();
pathInfos = pathInfos.filter(p => {

View file

@ -93,7 +93,7 @@ import template from './mediaLibraryEditor.template.html';
const listItem = dom.parentWithClass(e.target, 'listItem');
if (listItem) {
const index = parseInt(listItem.getAttribute('data-index'));
const index = parseInt(listItem.getAttribute('data-index'), 10);
const pathInfos = (currentOptions.library.LibraryOptions || {}).PathInfos || [];
const pathInfo = index == null ? {} : pathInfos[index] || {};
const originalPath = pathInfo.Path || (index == null ? null : currentOptions.library.Locations[index]);

View file

@ -357,14 +357,14 @@ import template from './metadataEditor.template.html';
let index;
const btnDeletePerson = dom.parentWithClass(e.target, 'btnDeletePerson');
if (btnDeletePerson) {
index = parseInt(btnDeletePerson.getAttribute('data-index'));
index = parseInt(btnDeletePerson.getAttribute('data-index'), 10);
currentItem.People.splice(index, 1);
populatePeople(context, currentItem.People);
}
const btnEditPerson = dom.parentWithClass(e.target, 'btnEditPerson');
if (btnEditPerson) {
index = parseInt(btnEditPerson.getAttribute('data-index'));
index = parseInt(btnEditPerson.getAttribute('data-index'), 10);
editPerson(context, currentItem.People[index], index);
}
});

View file

@ -114,8 +114,8 @@ import shell from '../../scripts/shell';
const itemId = item.Id;
// Convert to ms
const duration = parseInt(item.RunTimeTicks ? (item.RunTimeTicks / 10000) : 0);
const currentTime = parseInt(playState.PositionTicks ? (playState.PositionTicks / 10000) : 0);
const duration = parseInt(item.RunTimeTicks ? (item.RunTimeTicks / 10000) : 0, 10);
const currentTime = parseInt(playState.PositionTicks ? (playState.PositionTicks / 10000) : 0, 10);
const isPaused = playState.IsPaused || false;
const canSeek = playState.CanSeek || false;
@ -247,7 +247,7 @@ import shell from '../../scripts/shell';
navigator.mediaSession.setActionHandler('seekto', function (object) {
const item = playbackManager.getPlayerState(currentPlayer).NowPlayingItem;
// Convert to ms
const duration = parseInt(item.RunTimeTicks ? (item.RunTimeTicks / 10000) : 0);
const duration = parseInt(item.RunTimeTicks ? (item.RunTimeTicks / 10000) : 0, 10);
const wantedTime = object.seekTime * 1000;
playbackManager.seekPercent(wantedTime / duration * 100, currentPlayer);
});

View file

@ -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;
@ -1690,7 +1691,7 @@ class PlaybackManager {
function changeStream(player, ticks, params) {
if (canPlayerSeek(player) && params == null) {
player.currentTime(parseInt(ticks / 10000));
player.currentTime(parseInt(ticks / 10000, 10));
return;
}
@ -1714,7 +1715,7 @@ class PlaybackManager {
const apiClient = ServerConnections.getApiClient(currentItem.ServerId);
if (ticks) {
ticks = parseInt(ticks);
ticks = parseInt(ticks, 10);
}
const maxBitrate = params.MaxStreamingBitrate || self.getMaxStreamingBitrate(player);
@ -2265,7 +2266,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);
@ -3426,12 +3427,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) {
@ -3646,7 +3647,7 @@ class PlaybackManager {
percent /= 100;
ticks *= percent;
this.seek(parseInt(ticks), player);
this.seek(parseInt(ticks, 10), player);
}
seekMs(ms, player = this._currentPlayer) {
@ -4033,13 +4034,13 @@ class PlaybackManager {
this.setBrightness(cmd.Arguments.Brightness, player);
break;
case 'SetAudioStreamIndex':
this.setAudioStreamIndex(parseInt(cmd.Arguments.Index), player);
this.setAudioStreamIndex(parseInt(cmd.Arguments.Index, 10), player);
break;
case 'SetSubtitleStreamIndex':
this.setSubtitleStreamIndex(parseInt(cmd.Arguments.Index), player);
this.setSubtitleStreamIndex(parseInt(cmd.Arguments.Index, 10), player);
break;
case 'SetMaxStreamingBitrate':
this.setMaxStreamingBitrate(parseInt(cmd.Arguments.Bitrate), player);
this.setMaxStreamingBitrate(parseInt(cmd.Arguments.Bitrate, 10), player);
break;
case 'ToggleFullscreen':
this.toggleFullscreen(player);

View file

@ -43,7 +43,7 @@ function showQualityMenu(player, btn) {
items: menuItems,
positionTo: btn
}).then(function (id) {
const bitrate = parseInt(id);
const bitrate = parseInt(id, 10);
if (bitrate !== selectedBitrate) {
playbackManager.setMaxStreamingBitrate({
enableAutomaticBitrateDetection: bitrate ? false : true,

View file

@ -1,5 +1,3 @@
/*eslint prefer-const: "error"*/
let currentId = 0;
function addUniquePlaylistItemId(item) {
if (!item.PlaylistItemId) {

View file

@ -12,8 +12,6 @@ import ServerConnections from '../ServerConnections';
import toast from '../toast/toast';
import template from './recordingfields.template.html';
/*eslint prefer-const: "error"*/
function loadData(parent, program) {
if (program.IsSeries) {
parent.querySelector('.recordSeriesContainer').classList.remove('hide');

View file

@ -5,8 +5,6 @@ import toast from '../toast/toast';
import confirm from '../confirm/confirm';
import dialog from '../dialog/dialog';
/*eslint prefer-const: "error"*/
function changeRecordingToSeries(apiClient, timerId, programId, confirmTimerCancellation) {
loading.show();

View file

@ -17,8 +17,6 @@ import '../../styles/flexstyles.scss';
import ServerConnections from '../ServerConnections';
import template from './seriesrecordingeditor.template.html';
/*eslint prefer-const: "error"*/
let currentDialog;
let recordingUpdated = false;
let recordingDeleted = false;

View file

@ -13,8 +13,6 @@ import '../formdialog.scss';
import ServerConnections from '../ServerConnections';
import toast from '../toast/toast';
/*eslint prefer-const: "error"*/
function getEditorHtml() {
let html = '';

View file

@ -20,8 +20,6 @@ import ServerConnections from '../ServerConnections';
import toast from '../toast/toast';
import { appRouter } from '../appRouter';
/*eslint prefer-const: "error"*/
let showMuteButton = true;
let showVolumeSlider = true;
@ -46,7 +44,7 @@ function showAudioMenu(context, player, button) {
items: menuItems,
positionTo: button,
callback: function (id) {
playbackManager.setAudioStreamIndex(parseInt(id), player);
playbackManager.setAudioStreamIndex(parseInt(id, 10), player);
}
});
});
@ -78,7 +76,7 @@ function showSubtitleMenu(context, player, button) {
items: menuItems,
positionTo: button,
callback: function (id) {
playbackManager.setSubtitleStreamIndex(parseInt(id), player);
playbackManager.setSubtitleStreamIndex(parseInt(id, 10), player);
}
});
});

View file

@ -150,7 +150,7 @@ import toast from './toast/toast';
StartDate: card.getAttribute('data-startdate'),
EndDate: card.getAttribute('data-enddate'),
UserData: {
PlaybackPositionTicks: parseInt(card.getAttribute('data-positionticks') || '0')
PlaybackPositionTicks: parseInt(card.getAttribute('data-positionticks') || '0', 10)
}
};
}
@ -201,7 +201,7 @@ import toast from './toast/toast';
ServerId: serverId
});
} else if (action === 'play' || action === 'resume') {
const startPositionTicks = parseInt(card.getAttribute('data-positionticks') || '0');
const startPositionTicks = parseInt(card.getAttribute('data-positionticks') || '0', 10);
if (playbackManager.canPlay(item)) {
playbackManager.play({

View file

@ -100,7 +100,7 @@ import { getParameterByName } from '../../../utils/url.ts';
}).join('') + '</div>';
const elem = $('.httpHeaderIdentificationList', page).html(html).trigger('create');
$('.btnDeleteIdentificationHeader', elem).on('click', function () {
const itemIndex = parseInt(this.getAttribute('data-index'));
const itemIndex = parseInt(this.getAttribute('data-index'), 10);
currentProfile.Identification.Headers.splice(itemIndex, 1);
renderIdentificationHeaders(page, currentProfile.Identification.Headers);
});
@ -154,7 +154,7 @@ import { getParameterByName } from '../../../utils/url.ts';
}).join('') + '</div>';
const elem = $('.xmlDocumentAttributeList', page).html(html).trigger('create');
$('.btnDeleteXmlAttribute', elem).on('click', function () {
const itemIndex = parseInt(this.getAttribute('data-index'));
const itemIndex = parseInt(this.getAttribute('data-index'), 10);
currentProfile.XmlRootAttributes.splice(itemIndex, 1);
renderXmlDocumentAttributes(page, currentProfile.XmlRootAttributes);
});
@ -198,12 +198,12 @@ import { getParameterByName } from '../../../utils/url.ts';
}).join('') + '</div>';
const elem = $('.subtitleProfileList', page).html(html).trigger('create');
$('.btnDeleteProfile', elem).on('click', function () {
const itemIndex = parseInt(this.getAttribute('data-index'));
const itemIndex = parseInt(this.getAttribute('data-index'), 10);
currentProfile.SubtitleProfiles.splice(itemIndex, 1);
renderSubtitleProfiles(page, currentProfile.SubtitleProfiles);
});
$('.lnkEditSubProfile', elem).on('click', function () {
const itemIndex = parseInt(this.getAttribute('data-index'));
const itemIndex = parseInt(this.getAttribute('data-index'), 10);
editSubtitleProfile(page, currentProfile.SubtitleProfiles[itemIndex]);
});
}
@ -292,7 +292,7 @@ import { getParameterByName } from '../../../utils/url.ts';
deleteDirectPlayProfile(page, index);
});
$('.lnkEditSubProfile', elem).on('click', function () {
const index = parseInt(this.getAttribute('data-profileindex'));
const index = parseInt(this.getAttribute('data-profileindex'), 10);
editDirectPlayProfile(page, currentProfile.DirectPlayProfiles[index]);
});
}
@ -353,7 +353,7 @@ import { getParameterByName } from '../../../utils/url.ts';
deleteTranscodingProfile(page, index);
});
$('.lnkEditSubProfile', elem).on('click', function () {
const index = parseInt(this.getAttribute('data-profileindex'));
const index = parseInt(this.getAttribute('data-profileindex'), 10);
editTranscodingProfile(page, currentProfile.TranscodingProfiles[index]);
});
}
@ -437,7 +437,7 @@ import { getParameterByName } from '../../../utils/url.ts';
deleteContainerProfile(page, index);
});
$('.lnkEditSubProfile', elem).on('click', function () {
const index = parseInt(this.getAttribute('data-profileindex'));
const index = parseInt(this.getAttribute('data-profileindex'), 10);
editContainerProfile(page, currentProfile.ContainerProfiles[index]);
});
}
@ -509,7 +509,7 @@ import { getParameterByName } from '../../../utils/url.ts';
deleteCodecProfile(page, index);
});
$('.lnkEditSubProfile', elem).on('click', function () {
const index = parseInt(this.getAttribute('data-profileindex'));
const index = parseInt(this.getAttribute('data-profileindex'), 10);
editCodecProfile(page, currentProfile.CodecProfiles[index]);
});
}
@ -589,7 +589,7 @@ import { getParameterByName } from '../../../utils/url.ts';
deleteResponseProfile(page, index);
});
$('.lnkEditSubProfile', elem).on('click', function () {
const index = parseInt(this.getAttribute('data-profileindex'));
const index = parseInt(this.getAttribute('data-profileindex'), 10);
editResponseProfile(page, currentProfile.ResponseProfiles[index]);
});
}

View file

@ -98,8 +98,8 @@ import alert from '../../components/alert';
config.VppTonemappingBrightness = form.querySelector('#txtVppTonemappingBrightness').value;
config.VppTonemappingContrast = form.querySelector('#txtVppTonemappingContrast').value;
config.EncoderPreset = form.querySelector('#selectEncoderPreset').value;
config.H264Crf = parseInt(form.querySelector('#txtH264Crf').value || '0');
config.H265Crf = parseInt(form.querySelector('#txtH265Crf').value || '0');
config.H264Crf = parseInt(form.querySelector('#txtH264Crf').value || '0', 10);
config.H265Crf = parseInt(form.querySelector('#txtH265Crf').value || '0', 10);
config.DeinterlaceMethod = form.querySelector('#selectDeinterlaceMethod').value;
config.DeinterlaceDoubleRate = form.querySelector('#chkDoubleRateDeinterlacing').checked;
config.EnableSubtitleExtraction = form.querySelector('#chkEnableSubtitleExtraction').checked;

View file

@ -92,7 +92,7 @@ import cardBuilder from '../../components/cardbuilder/cardBuilder';
function showCardMenu(page, elem, virtualFolders) {
const card = dom.parentWithClass(elem, 'card');
const index = parseInt(card.getAttribute('data-index'));
const index = parseInt(card.getAttribute('data-index'), 10);
const virtualFolder = virtualFolders[index];
const menuItems = [];
menuItems.push({
@ -192,7 +192,7 @@ import cardBuilder from '../../components/cardbuilder/cardBuilder';
});
$('.editLibrary', divVirtualFolders).on('click', function () {
const card = $(this).parents('.card')[0];
const index = parseInt(card.getAttribute('data-index'));
const index = parseInt(card.getAttribute('data-index'), 10);
const virtualFolder = virtualFolders[index];
if (virtualFolder.ItemId) {

View file

@ -235,7 +235,7 @@ import { getParameterByName } from '../../../utils/url.ts';
const btnDeleteTrigger = dom.parentWithClass(e.target, 'btnDeleteTrigger');
if (btnDeleteTrigger) {
ScheduledTaskPage.confirmDeleteTrigger(view, parseInt(btnDeleteTrigger.getAttribute('data-index')));
ScheduledTaskPage.confirmDeleteTrigger(view, parseInt(btnDeleteTrigger.getAttribute('data-index'), 10));
}
});
view.addEventListener('viewshow', function () {

View file

@ -15,7 +15,7 @@ import Dashboard from '../../utils/dashboard';
loading.show();
const form = this;
ApiClient.getServerConfiguration().then(function (config) {
config.RemoteClientBitrateLimit = parseInt(1e6 * parseFloat($('#txtRemoteClientBitrateLimit', form).val() || '0'));
config.RemoteClientBitrateLimit = parseInt(1e6 * parseFloat($('#txtRemoteClientBitrateLimit', form).val() || '0'), 10);
ApiClient.updateServerConfiguration(config).then(Dashboard.processServerConfigurationUpdateResult);
});

View file

@ -222,17 +222,17 @@ export default function (view, params) {
}
function onBeforeTabChange(evt) {
preLoadTab(view, parseInt(evt.detail.selectedTabIndex));
preLoadTab(view, parseInt(evt.detail.selectedTabIndex, 10));
}
function onTabChange(evt) {
const previousTabController = tabControllers[parseInt(evt.detail.previousIndex)];
const previousTabController = tabControllers[parseInt(evt.detail.previousIndex, 10)];
if (previousTabController && previousTabController.onHide) {
previousTabController.onHide();
}
loadTab(view, parseInt(evt.detail.selectedTabIndex));
loadTab(view, parseInt(evt.detail.selectedTabIndex, 10));
}
function getTabContainers() {
@ -339,7 +339,7 @@ export default function (view, params) {
let isViewRestored;
const self = this;
let currentTabIndex = parseInt(params.tab || getDefaultTabIndex('livetv'));
let currentTabIndex = parseInt(params.tab || getDefaultTabIndex('livetv'), 10);
let initialTabIndex = currentTabIndex;
let lastFullRender = 0;
[].forEach.call(view.querySelectorAll('.sectionTitleTextButton-programs'), function (link) {

View file

@ -245,11 +245,11 @@ import Dashboard from '../../utils/dashboard';
}
function onBeforeTabChange(e) {
preLoadTab(view, parseInt(e.detail.selectedTabIndex));
preLoadTab(view, parseInt(e.detail.selectedTabIndex, 10));
}
function onTabChange(e) {
loadTab(view, parseInt(e.detail.selectedTabIndex));
loadTab(view, parseInt(e.detail.selectedTabIndex, 10));
}
function getTabContainers() {
@ -350,7 +350,7 @@ import Dashboard from '../../utils/dashboard';
}
}
let currentTabIndex = parseInt(params.tab || getDefaultTabIndex(params.topParentId));
let currentTabIndex = parseInt(params.tab || getDefaultTabIndex(params.topParentId), 10);
const suggestionsTabIndex = 1;
this.initTab = function () {

View file

@ -975,7 +975,7 @@ import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../../components
title: globalize.translate('Audio'),
positionTo: positionTo
}).then(function (id) {
const index = parseInt(id);
const index = parseInt(id, 10);
if (index !== currentIndex) {
playbackManager.setAudioStreamIndex(index, player);
@ -1022,7 +1022,7 @@ import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../../components
positionTo
}).then(function (id) {
if (id) {
const index = parseInt(id);
const index = parseInt(id, 10);
if (index !== currentIndex) {
playbackManager.setSecondarySubtitleStreamIndex(index, player);
}
@ -1099,7 +1099,7 @@ import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../../components
console.error(e);
}
} else {
const index = parseInt(id);
const index = parseInt(id, 10);
if (index !== currentIndex) {
playbackManager.setSubtitleStreamIndex(index, player);
@ -1633,7 +1633,7 @@ import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../../components
ms /= 100;
ms *= value;
ms += programStartDateMs;
return '<h1 class="sliderBubbleText">' + getDisplayTimeWithoutAmPm(new Date(parseInt(ms)), true) + '</h1>';
return '<h1 class="sliderBubbleText">' + getDisplayTimeWithoutAmPm(new Date(parseInt(ms, 10)), true) + '</h1>';
}
return '--:--';

View file

@ -224,11 +224,11 @@ import autoFocuser from '../../components/autoFocuser';
export default function (view, params) {
function onBeforeTabChange(e) {
preLoadTab(view, parseInt(e.detail.selectedTabIndex));
preLoadTab(view, parseInt(e.detail.selectedTabIndex, 10));
}
function onTabChange(e) {
const newIndex = parseInt(e.detail.selectedTabIndex);
const newIndex = parseInt(e.detail.selectedTabIndex, 10);
loadTab(view, newIndex);
}
@ -340,7 +340,7 @@ import autoFocuser from '../../components/autoFocuser';
}
const self = this;
let currentTabIndex = parseInt(params.tab || getDefaultTabIndex(params.topParentId));
let currentTabIndex = parseInt(params.tab || getDefaultTabIndex(params.topParentId), 10);
const suggestionsTabIndex = 1;
self.initTab = function () {

View file

@ -414,7 +414,7 @@ import Sortable from 'sortablejs';
clearRefreshInterval(itemsContainer);
if (!intervalMs) {
intervalMs = parseInt(itemsContainer.getAttribute('data-refreshinterval') || '0');
intervalMs = parseInt(itemsContainer.getAttribute('data-refreshinterval') || '0', 10);
}
if (intervalMs) {

View file

@ -3,8 +3,8 @@
const ProgressBarPrototype = Object.create(HTMLDivElement.prototype);
function onAutoTimeProgress() {
const start = parseInt(this.getAttribute('data-starttime'));
const end = parseInt(this.getAttribute('data-endtime'));
const start = parseInt(this.getAttribute('data-starttime'), 10);
const end = parseInt(this.getAttribute('data-endtime'), 10);
const now = new Date().getTime();
const total = end - start;

View file

@ -91,7 +91,7 @@ const EmbyScrollButtonsPrototype = Object.create(HTMLDivElement.prototype);
return 0;
}
value = parseInt(value);
value = parseInt(value, 10);
if (isNaN(value)) {
return 0;
}

View file

@ -75,7 +75,7 @@ const Scroller: FC<ScrollerProps> = ({
return 0;
}
if (isNaN(parseInt(value))) {
if (isNaN(parseInt(value, 10))) {
return 0;
}

View file

@ -75,11 +75,11 @@ import '../../styles/scrollstyles.scss';
current.classList.remove(activeButtonClass);
}
const previousIndex = current ? parseInt(current.getAttribute('data-index')) : null;
const previousIndex = current ? parseInt(current.getAttribute('data-index'), 10) : null;
setActiveTabButton(tabButton);
const index = parseInt(tabButton.getAttribute('data-index'));
const index = parseInt(tabButton.getAttribute('data-index'), 10);
triggerBeforeTabChange(tabs, index, previousIndex);
@ -194,7 +194,7 @@ import '../../styles/scrollstyles.scss';
initScroller(this);
const current = this.querySelector('.' + activeButtonClass);
const currentIndex = current ? parseInt(current.getAttribute('data-index')) : parseInt(this.getAttribute('data-index') || '0');
const currentIndex = current ? parseInt(current.getAttribute('data-index'), 10) : parseInt(this.getAttribute('data-index') || '0', 10);
if (currentIndex !== -1) {
this.selectedTabIndex = currentIndex;

View file

@ -14,7 +14,7 @@ function calculateOffset(textarea) {
let offset = 0;
for (let i = 0; i < props.length; i++) {
offset += parseInt(style[props[i]]);
offset += parseInt(style[props[i]], 10);
}
return offset;
}

View file

@ -1,10 +1,11 @@
/* eslint-disable indent */
import ServerConnections from '../../components/ServerConnections';
import { PluginType } from '../../types/plugin.ts';
class BackdropScreensaver {
constructor() {
this.name = 'Backdrop ScreenSaver';
this.type = 'screensaver';
this.type = PluginType.Screensaver;
this.id = 'backdropscreensaver';
this.supportsAnonymous = false;
}

View file

@ -9,6 +9,7 @@ import TableOfContents from './tableOfContents';
import dom from '../../scripts/dom';
import { translateHtml } from '../../scripts/globalize';
import * as userSettings from '../../scripts/settings/userSettings';
import { PluginType } from '../../types/plugin.ts';
import Events from '../../utils/events.ts';
import '../../elements/emby-button/paper-icon-button-light';
@ -19,7 +20,7 @@ import './style.scss';
export class BookPlayer {
constructor() {
this.name = 'Book Player';
this.type = 'mediaplayer';
this.type = PluginType.MediaPlayer;
this.id = 'bookplayer';
this.priority = 1;

View file

@ -5,6 +5,7 @@ import globalize from '../../scripts/globalize';
import castSenderApiLoader from './castSenderApi';
import ServerConnections from '../../components/ServerConnections';
import alert from '../../components/alert';
import { PluginType } from '../../types/plugin.ts';
import Events from '../../utils/events.ts';
// Based on https://github.com/googlecast/CastVideos-chrome/blob/master/CastVideos.js
@ -569,7 +570,7 @@ class ChromecastPlayer {
constructor() {
// playbackManager needs this
this.name = PlayerName;
this.type = 'mediaplayer';
this.type = PluginType.MediaPlayer;
this.id = 'chromecast';
this.isLocalPlayer = false;
this.lastPlayerData = {};
@ -683,7 +684,7 @@ class ChromecastPlayer {
}
seek(position) {
position = parseInt(position);
position = parseInt(position, 10);
position = position / 10000000;

View file

@ -6,13 +6,14 @@ import keyboardnavigation from '../../scripts/keyboardNavigation';
import { appRouter } from '../../components/appRouter';
import ServerConnections from '../../components/ServerConnections';
import * as userSettings from '../../scripts/settings/userSettings';
import { PluginType } from '../../types/plugin.ts';
import './style.scss';
export class ComicsPlayer {
constructor() {
this.name = 'Comics Player';
this.type = 'mediaplayer';
this.type = PluginType.MediaPlayer;
this.id = 'comicsplayer';
this.priority = 1;
this.imageMap = new Map();

View file

@ -2,6 +2,7 @@ import globalize from '../../scripts/globalize';
import * as userSettings from '../../scripts/settings/userSettings';
import { appHost } from '../../components/apphost';
import alert from '../../components/alert';
import { PluginType } from '../../types/plugin.ts';
// TODO: Replace with date-fns
// https://stackoverflow.com/questions/6117814/get-week-of-year-in-javascript-like-in-php
@ -46,7 +47,7 @@ function showIsoMessage() {
class ExpirementalPlaybackWarnings {
constructor() {
this.name = 'Experimental playback warnings';
this.type = 'preplayintercept';
this.type = PluginType.PreplayIntercept;
this.id = 'expirementalplaybackwarnings';
}

View file

@ -3,6 +3,7 @@ import { appHost } from '../../components/apphost';
import * as htmlMediaHelper from '../../components/htmlMediaHelper';
import profileBuilder from '../../scripts/browserDeviceProfile';
import { getIncludeCorsCredentials } from '../../scripts/settings/webSettings';
import { PluginType } from '../../types/plugin.ts';
import Events from '../../utils/events.ts';
function getDefaultProfile() {
@ -88,7 +89,7 @@ class HtmlAudioPlayer {
const self = this;
self.name = 'Html Audio Player';
self.type = 'mediaplayer';
self.type = PluginType.MediaPlayer;
self.id = 'htmlaudioplayer';
// Let any players created by plugins take priority

View file

@ -30,6 +30,7 @@ import ServerConnections from '../../components/ServerConnections';
import profileBuilder, { canPlaySecondaryAudio } from '../../scripts/browserDeviceProfile';
import { getIncludeCorsCredentials } from '../../scripts/settings/webSettings';
import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../components/backdrop/backdrop';
import { PluginType } from '../../types/plugin.ts';
import Events from '../../utils/events.ts';
import { includesAny } from '../../utils/container.ts';
import debounce from 'lodash-es/debounce';
@ -170,7 +171,7 @@ function tryRemoveElement(elem) {
/**
* @type {string}
*/
type = 'mediaplayer';
type = PluginType.MediaPlayer;
/**
* @type {string}
*/

View file

@ -1,8 +1,10 @@
import { PluginType } from '../../types/plugin.ts';
export default function () {
const self = this;
self.name = 'Logo ScreenSaver';
self.type = 'screensaver';
self.type = PluginType.Screensaver;
self.id = 'logoscreensaver';
self.supportsAnonymous = true;

View file

@ -4,6 +4,7 @@ import keyboardnavigation from '../../scripts/keyboardNavigation';
import dialogHelper from '../../components/dialogHelper/dialogHelper';
import dom from '../../scripts/dom';
import { appRouter } from '../../components/appRouter';
import { PluginType } from '../../types/plugin.ts';
import Events from '../../utils/events.ts';
import './style.scss';
@ -12,7 +13,7 @@ import '../../elements/emby-button/paper-icon-button-light';
export class PdfPlayer {
constructor() {
this.name = 'PDF Player';
this.type = 'mediaplayer';
this.type = PluginType.MediaPlayer;
this.id = 'pdfplayer';
this.priority = 1;
@ -261,7 +262,7 @@ export class PdfPlayer {
for (const page of pages) {
if (!this.pages[page]) {
this.pages[page] = document.createElement('canvas');
this.renderPage(this.pages[page], parseInt(page.slice(4)));
this.renderPage(this.pages[page], parseInt(page.slice(4), 10));
}
}

View file

@ -1,9 +1,10 @@
import ServerConnections from '../../components/ServerConnections';
import { PluginType } from '../../types/plugin.ts';
export default class PhotoPlayer {
constructor() {
this.name = 'Photo Player';
this.type = 'mediaplayer';
this.type = PluginType.MediaPlayer;
this.id = 'photoplayer';
this.priority = 1;
}

View file

@ -1,6 +1,7 @@
import globalize from '../../scripts/globalize';
import ServerConnections from '../../components/ServerConnections';
import alert from '../../components/alert';
import { PluginType } from '../../types/plugin.ts';
function showErrorMessage() {
return alert(globalize.translate('MessagePlayAccessRestricted'));
@ -9,7 +10,7 @@ function showErrorMessage() {
class PlayAccessValidation {
constructor() {
this.name = 'Playback validation';
this.type = 'preplayintercept';
this.type = PluginType.PreplayIntercept;
this.id = 'playaccessvalidation';
this.order = -2;
}

View file

@ -1,6 +1,7 @@
import { playbackManager } from '../../components/playback/playbackmanager';
import serverNotifications from '../../scripts/serverNotifications';
import ServerConnections from '../../components/ServerConnections';
import { PluginType } from '../../types/plugin.ts';
import Events from '../../utils/events.ts';
function getActivePlayerId() {
@ -181,7 +182,7 @@ class SessionPlayer {
const self = this;
this.name = 'Remote Control';
this.type = 'mediaplayer';
this.type = PluginType.MediaPlayer;
this.isLocalPlayer = false;
this.id = 'remoteplayer';

View file

@ -254,7 +254,7 @@ class Manager {
if (typeof cmd.When === 'string') {
cmd.When = new Date(cmd.When);
cmd.EmittedAt = new Date(cmd.EmittedAt);
cmd.PositionTicks = cmd.PositionTicks ? parseInt(cmd.PositionTicks) : null;
cmd.PositionTicks = cmd.PositionTicks ? parseInt(cmd.PositionTicks, 10) : null;
}
if (!this.isSyncPlayEnabled()) {

View file

@ -5,8 +5,9 @@ import SyncPlay from './core';
import SyncPlayNoActivePlayer from './ui/players/NoActivePlayer';
import SyncPlayHtmlVideoPlayer from './ui/players/HtmlVideoPlayer';
import SyncPlayHtmlAudioPlayer from './ui/players/HtmlAudioPlayer';
import { Plugin, PluginType } from '../../types/plugin';
class SyncPlayPlugin {
class SyncPlayPlugin implements Plugin {
name: string;
id: string;
type: string;
@ -17,7 +18,7 @@ class SyncPlayPlugin {
this.id = 'syncplay';
// NOTE: This should probably be a "mediaplayer" so the playback manager can handle playback logic, but
// SyncPlay needs refactored so it does not have an independent playback manager.
this.type = 'syncplay';
this.type = PluginType.SyncPlay;
this.priority = 1;
this.init();

View file

@ -2,6 +2,7 @@ import browser from '../../scripts/browser';
import { appRouter } from '../../components/appRouter';
import loading from '../../components/loading/loading';
import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../components/backdrop/backdrop';
import { PluginType } from '../../types/plugin.ts';
import Events from '../../utils/events.ts';
/* globals YT */
@ -197,7 +198,7 @@ function setCurrentSrc(instance, elem, options) {
class YoutubePlayer {
constructor() {
this.name = 'Youtube Player';
this.type = 'mediaplayer';
this.type = PluginType.MediaPlayer;
this.id = 'youtubeplayer';
// Let any players created by plugins take priority

View file

@ -55,7 +55,7 @@ const getTabs = () => {
const Movies: FC = () => {
const [ searchParams ] = useSearchParams();
const currentTabIndex = parseInt(searchParams.get('tab') || getDefaultTabIndex(searchParams.get('topParentId')).toString());
const currentTabIndex = parseInt(searchParams.get('tab') || getDefaultTabIndex(searchParams.get('topParentId')).toString(), 10);
const [ selectedIndex, setSelectedIndex ] = useState(currentTabIndex);
const element = useRef<HTMLDivElement>(null);
@ -95,7 +95,7 @@ const Movies: FC = () => {
};
const onTabChange = useCallback((e: { detail: { selectedTabIndex: string; }; }) => {
const newIndex = parseInt(e.detail.selectedTabIndex);
const newIndex = parseInt(e.detail.selectedTabIndex, 10);
setSelectedIndex(newIndex);
}, []);

View file

@ -228,8 +228,8 @@ const UserEdit: FunctionComponent = () => {
user.Policy.EnableContentDownloading = (page.querySelector('.chkEnableDownloading') as HTMLInputElement).checked;
user.Policy.EnableRemoteAccess = (page.querySelector('.chkRemoteAccess') as HTMLInputElement).checked;
user.Policy.RemoteClientBitrateLimit = Math.floor(1e6 * parseFloat((page.querySelector('#txtRemoteClientBitrateLimit') as HTMLInputElement).value || '0'));
user.Policy.LoginAttemptsBeforeLockout = parseInt((page.querySelector('#txtLoginAttemptsBeforeLockout') as HTMLInputElement).value || '0');
user.Policy.MaxActiveSessions = parseInt((page.querySelector('#txtMaxActiveSessions') as HTMLInputElement).value || '0');
user.Policy.LoginAttemptsBeforeLockout = parseInt((page.querySelector('#txtLoginAttemptsBeforeLockout') as HTMLInputElement).value || '0', 10);
user.Policy.MaxActiveSessions = parseInt((page.querySelector('#txtMaxActiveSessions') as HTMLInputElement).value || '0', 10);
user.Policy.AuthenticationProviderId = (page.querySelector('#selectLoginProvider') as HTMLSelectElement).value;
user.Policy.PasswordResetProviderId = (page.querySelector('#selectPasswordResetProvider') as HTMLSelectElement).value;
user.Policy.EnableContentDeletion = (page.querySelector('.chkEnableDeleteAllFolders') as HTMLInputElement).checked;

View file

@ -224,7 +224,7 @@ const uaMatch = function (ua) {
version = version || match[2] || '0';
let versionMajor = parseInt(version.split('.')[0]);
let versionMajor = parseInt(version.split('.')[0], 10);
if (isNaN(versionMajor)) {
versionMajor = 0;
@ -295,7 +295,7 @@ if (browser.web0s) {
delete browser.safari;
const v = (navigator.appVersion).match(/Tizen (\d+).(\d+)/);
browser.tizenVersion = parseInt(v[1]);
browser.tizenVersion = parseInt(v[1], 10);
} else {
browser.orsay = userAgent.toLowerCase().indexOf('smarthub') !== -1;
}

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) {

View file

@ -98,11 +98,11 @@ function processGeneralCommand(cmd, apiClient) {
break;
case 'SetAudioStreamIndex':
notifyApp();
playbackManager.setAudioStreamIndex(parseInt(cmd.Arguments.Index));
playbackManager.setAudioStreamIndex(parseInt(cmd.Arguments.Index, 10));
break;
case 'SetSubtitleStreamIndex':
notifyApp();
playbackManager.setSubtitleStreamIndex(parseInt(cmd.Arguments.Index));
playbackManager.setSubtitleStreamIndex(parseInt(cmd.Arguments.Index, 10));
break;
case 'ToggleFullscreen':
inputManager.handleCommand('togglefullscreen');

View file

@ -70,7 +70,7 @@ class AppSettings {
// return a huge number so that it always direct plays
return 150000000;
} else {
return parseInt(this.get(key) || '0') || 1500000;
return parseInt(this.get(key) || '0', 10) || 1500000;
}
}
@ -80,7 +80,7 @@ class AppSettings {
}
const defaultValue = 320000;
return parseInt(this.get('maxStaticMusicBitrate') || defaultValue.toString()) || defaultValue;
return parseInt(this.get('maxStaticMusicBitrate') || defaultValue.toString(), 10) || defaultValue;
}
maxChromecastBitrate(val) {
@ -89,7 +89,7 @@ class AppSettings {
}
val = this.get('chromecastBitrate1');
return val ? parseInt(val) : null;
return val ? parseInt(val, 10) : null;
}
/**

View file

@ -348,7 +348,7 @@ export class UserSettings {
return this.set('skipBackLength', val.toString());
}
return parseInt(this.get('skipBackLength') || '10000');
return parseInt(this.get('skipBackLength') || '10000', 10);
}
/**
@ -361,7 +361,7 @@ export class UserSettings {
return this.set('skipForwardLength', val.toString());
}
return parseInt(this.get('skipForwardLength') || '30000');
return parseInt(this.get('skipForwardLength') || '30000', 10);
}
/**

View file

@ -1622,7 +1622,7 @@
"DeletedScene": "Vymazaná scéna",
"BehindTheScenes": "Z natáčení",
"Trailer": "Upoutávka",
"Clip": "Krátký film",
"Clip": "Filmový klip",
"AllowEmbeddedSubtitlesHelp": "Zakázat titulky, které jsou vložené v kontejneru média. Vyžaduje kompletní přeskenování knihovny.",
"AllowEmbeddedSubtitlesAllowTextOption": "Povolit textové titulky",
"AllowEmbeddedSubtitlesAllowImageOption": "Povolit grafické titulky",
@ -1714,5 +1714,7 @@
"SubtitleMagenta": "Fialová",
"SubtitleRed": "Červená",
"SubtitleWhite": "Bílá",
"SubtitleYellow": "Žlutá"
"SubtitleYellow": "Žlutá",
"Featurette": "Středně dlouhý film",
"Short": "Krátký film"
}

View file

@ -1671,7 +1671,9 @@
"UnknownAudioStreamInfo": "The audio stream info is unknown",
"DirectPlayError": "There was an error starting direct playback",
"SelectAll": "Select All",
"Clip": "Featurette",
"Featurette": "Featurette",
"Short": "Short",
"Clip": "Clip",
"Trailer": "Trailer",
"BehindTheScenes": "Behind the Scenes",
"DeletedScene": "Deleted Scene",

View file

@ -1614,7 +1614,7 @@
"AudioIsExternal": "Le flux audio est externe",
"SelectAll": "Tout sélectionner",
"ButtonExitApp": "Quitter l'application",
"Clip": "Court-métrage",
"Clip": "Clip",
"ThemeVideo": "Générique",
"ThemeSong": "Thème musical",
"Sample": "Échantillon",
@ -1714,5 +1714,7 @@
"SubtitleMagenta": "Magenta",
"SubtitleRed": "Rouge",
"SubtitleWhite": "Blanc",
"SubtitleYellow": "Jaune"
"SubtitleYellow": "Jaune",
"Featurette": "Featurette",
"Short": "Court-métrage"
}

13
src/types/plugin.ts Normal file
View file

@ -0,0 +1,13 @@
export enum PluginType {
MediaPlayer = 'mediaplayer',
PreplayIntercept = 'preplayintercept',
Screensaver = 'screensaver',
SyncPlay = 'syncplay'
}
export interface Plugin {
name: string
id: string
type: PluginType | string
priority: number
}