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-15 16:28:15 +09:00 committed by GitHub
commit 5239ae2ad2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 225 additions and 194 deletions

View file

@ -18,6 +18,7 @@ import browser from '../../scripts/browser';
import { playbackManager } from '../playback/playbackmanager';
import itemShortcuts from '../shortcuts';
import imageHelper from '../../scripts/imagehelper';
import { randomInt } from '../../utils/number.ts';
import './card.scss';
import '../../elements/emby-button/paper-icon-button-light';
import '../guide/programs.scss';
@ -640,16 +641,6 @@ import { appRouter } from '../appRouter';
};
}
/**
* Generates a random integer in a given range.
* @param {number} min - Minimum of the range.
* @param {number} max - Maximum of the range.
* @returns {number} Randomly generated number.
*/
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
/**
* Generates an index used to select the default color of a card based on a string.
* @param {?string} [str] - String to use for generating the index.
@ -669,7 +660,7 @@ import { appRouter } from '../appRouter';
return (index % numRandomColors) + 1;
} else {
return getRandomInt(1, numRandomColors);
return randomInt(1, numRandomColors);
}
}

View file

@ -15,7 +15,6 @@ import toast from './toast/toast';
const user = options.user;
const canPlay = playbackManager.canPlay(item);
const restrictOptions = (browser.operaTv || browser.web0s) && !user.Policy.IsAdministrator;
const commands = [];
@ -99,8 +98,8 @@ import toast from './toast/toast';
});
}
if (!restrictOptions) {
if (itemHelper.supportsAddingToCollection(item)) {
if (!browser.tv) {
if (itemHelper.supportsAddingToCollection(item) && options.EnableCollectionManagement) {
commands.push({
name: globalize.translate('AddToCollection'),
id: 'addtocollection',
@ -272,7 +271,7 @@ import toast from './toast/toast';
});
}
if (!restrictOptions && options.share === true && itemHelper.canShare(item, user)) {
if (!browser.tv && options.share === true && itemHelper.canShare(item, user)) {
commands.push({
name: globalize.translate('Share'),
id: 'share',

View file

@ -1,3 +1,5 @@
import { randomInt } from '../../utils/number.ts';
let currentId = 0;
function addUniquePlaylistItemId(item) {
if (!item.PlaylistItemId) {
@ -56,7 +58,7 @@ class PlayQueueManager {
const currentPlaylistItem = this._playlist.splice(this.getCurrentPlaylistIndex(), 1)[0];
for (let i = this._playlist.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * i);
const j = randomInt(0, i - 1);
const temp = this._playlist[i];
this._playlist[i] = this._playlist[j];
this._playlist[j] = temp;

View file

@ -80,6 +80,13 @@
</div>
</div>
<div class="verticalSection">
<h2>${HeaderPerformance}</h2>
<div class="inputContainer">
<input is="emby-input" id="txtParallelImageEncodingLimit" label="${LabelParallelImageEncodingLimit}" type="number" pattern="[0-9]*" min="0" step="1" />
<div class="fieldDescription">${LabelParallelImageEncodingLimitHelp}</div>
</div>
</div>
<br />
<div>
<button is="emby-button" type="submit" class="raised button-submit block">

View file

@ -21,6 +21,7 @@ import alert from '../../components/alert';
$('#selectLocalizationLanguage', page).html(languageOptions.map(function (language) {
return '<option value="' + language.Value + '">' + language.Name + '</option>';
})).val(config.UICulture);
page.querySelector('#txtParallelImageEncodingLimit').value = config.ParallelImageEncodingLimit || '';
loading.hide();
}
@ -36,6 +37,7 @@ import alert from '../../components/alert';
config.MetadataPath = $('#txtMetadataPath', form).val();
config.MetadataNetworkPath = $('#txtMetadataNetworkPath', form).val();
config.QuickConnectAvailable = form.querySelector('#chkQuickConnectAvailable').checked;
config.ParallelImageEncodingLimit = parseInt(form.querySelector('#txtParallelImageEncodingLimit').value || '0', 10);
ApiClient.updateServerConfiguration(config).then(function() {
ApiClient.getNamedConfiguration(brandingConfigKey).then(function(brandingConfig) {

View file

@ -1,4 +1,5 @@
import { PluginType } from '../../types/plugin.ts';
import { randomInt } from '../../utils/number.ts';
export default function () {
const self = this;
@ -25,16 +26,12 @@ export default function () {
const elem = document.querySelector('.logoScreenSaverImage');
if (elem && elem.animate) {
const random = getRandomInt(0, animations.length - 1);
const random = randomInt(0, animations.length - 1);
animations[random](elem, 1);
}
}
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function bounceInLeft(elem, iterations) {
const keyframes = [
{ transform: 'translate3d(-3000px, 0, 0)', opacity: '0', offset: 0 },

View file

@ -159,6 +159,7 @@ const UserEdit: FunctionComponent = () => {
(page.querySelector('.chkIsAdmin') as HTMLInputElement).checked = user.Policy.IsAdministrator;
(page.querySelector('.chkDisabled') as HTMLInputElement).checked = user.Policy.IsDisabled;
(page.querySelector('.chkIsHidden') as HTMLInputElement).checked = user.Policy.IsHidden;
(page.querySelector('.chkEnableCollectionManagement') as HTMLInputElement).checked = user.Policy.EnableCollectionManagement;
(page.querySelector('.chkRemoteControlSharedDevices') as HTMLInputElement).checked = user.Policy.EnableSharedDeviceControl;
(page.querySelector('.chkEnableRemoteControlOtherUsers') as HTMLInputElement).checked = user.Policy.EnableRemoteControlOfOtherUsers;
(page.querySelector('.chkEnableDownloading') as HTMLInputElement).checked = user.Policy.EnableContentDownloading;
@ -224,6 +225,7 @@ const UserEdit: FunctionComponent = () => {
user.Policy.EnableAudioPlaybackTranscoding = (page.querySelector('.chkEnableAudioPlaybackTranscoding') as HTMLInputElement).checked;
user.Policy.EnableVideoPlaybackTranscoding = (page.querySelector('.chkEnableVideoPlaybackTranscoding') as HTMLInputElement).checked;
user.Policy.EnablePlaybackRemuxing = (page.querySelector('.chkEnableVideoPlaybackRemuxing') as HTMLInputElement).checked;
user.Policy.EnableCollectionManagement = (page.querySelector('.chkEnableCollectionManagement') as HTMLInputElement).checked;
user.Policy.ForceRemoteSourceTranscoding = (page.querySelector('.chkForceRemoteSourceTranscoding') as HTMLInputElement).checked;
user.Policy.EnableContentDownloading = (page.querySelector('.chkEnableDownloading') as HTMLInputElement).checked;
user.Policy.EnableRemoteAccess = (page.querySelector('.chkRemoteAccess') as HTMLInputElement).checked;
@ -375,6 +377,11 @@ const UserEdit: FunctionComponent = () => {
className='chkIsAdmin'
title='OptionAllowUserToManageServer'
/>
<CheckBoxElement
labelClassName='checkboxContainer'
className='chkEnableCollectionManagement'
title='AllowCollectionManagement'
/>
<div id='featureAccessFields' className='verticalSection'>
<h2 className='paperListLabel'>
{globalize.translate('HeaderFeatureAccess')}

View file

@ -1380,7 +1380,7 @@
"UnknownAudioStreamInfo": "Інфармацыя аб аўдыяплыні невядомая",
"DirectPlayError": "Узнікла памылка пры запуску прамога прайгравання",
"SelectAll": "Абраць усё",
"Clip": "Художнік",
"Clip": "Кліп",
"Sample": "Прыклад",
"LabelVppTonemappingBrightness": "Узмацненне яркасці танальнага адлюстравання VPP:",
"LabelVppTonemappingBrightnessHelp": "Прымяніць узмацненне яркасці ў танальным адлюстраванні VPP. І рэкамендаванае, і стандартнае значэнне роўна 0.",
@ -1700,5 +1700,7 @@
"SubtitleMagenta": "Пурпурны",
"SubtitleRed": "Чырвоны",
"SubtitleWhite": "Белы",
"SubtitleYellow": "Жоўты"
"SubtitleYellow": "Жоўты",
"Featurette": "Кароткаметражка",
"Short": "Кароткаметражка"
}

View file

@ -1714,5 +1714,7 @@
"SubtitleMagenta": "Magenta",
"SubtitleRed": "Rot",
"SubtitleWhite": "Weiß",
"SubtitleYellow": "Gelb"
"SubtitleYellow": "Gelb",
"Featurette": "Featurette",
"Short": "Kurzfilm"
}

View file

@ -1629,7 +1629,7 @@
"DeletedScene": "Deleted Scene",
"BehindTheScenes": "Behind the Scenes",
"Trailer": "Trailer",
"Clip": "Featurette",
"Clip": "Clip",
"ShowParentImages": "Show programme images",
"NextUpRewatching": "Rewatching",
"MixedMoviesShows": "Mixed Films and Programmes",
@ -1714,5 +1714,7 @@
"SubtitleMagenta": "Magenta",
"SubtitleRed": "Red",
"SubtitleWhite": "White",
"SubtitleYellow": "Yellow"
"SubtitleYellow": "Yellow",
"Featurette": "Featurette",
"Short": "Short"
}

View file

@ -420,6 +420,7 @@
"HeaderPassword": "Password",
"HeaderPasswordReset": "Password Reset",
"HeaderPaths": "Paths",
"HeaderPerformance": "Performance",
"HeaderPhotoAlbums": "Photo Albums",
"HeaderPinCodeReset": "Reset Easy PIN Code",
"HeaderPlayAll": "Play All",
@ -791,6 +792,8 @@
"LabelOriginalName": "Original name:",
"LabelOriginalTitle": "Original title:",
"LabelOverview": "Overview:",
"LabelParallelImageEncodingLimit": "Parallel image encoding limit",
"LabelParallelImageEncodingLimitHelp": "Maximum amount of image encodings that are allowed to run in parallel. Setting this to 0 will choose a limit based on your system specs.",
"LabelParentalRating": "Parental rating:",
"LabelParentNumber": "Parent number:",
"LabelPassword": "Password:",

View file

@ -1634,7 +1634,7 @@
"ButtonSpace": "Välilyönti",
"ThemeVideo": "Tunnusvideo",
"ThemeSong": "Tunnusmusiikki",
"Clip": "Lyhytfilmi",
"Clip": "Klippi",
"Scene": "Kohtaus",
"Interview": "Haastattelu",
"UnknownAudioStreamInfo": "Äänivirran tiedot ovat tuntemattomia",
@ -1677,7 +1677,7 @@
"MessageNoFavoritesAvailable": "Suosikkeja ei ole tällä hetkellä käytettävissä.",
"EnableCardLayout": "Näytä visuaalinen KorttiLaatikko",
"Unreleased": "Ei vielä julkaistu",
"MediaInfoDvVersionMajor": "",
"MediaInfoDvVersionMajor": "DV-pääversio",
"DownloadAll": "Lataa kaikki",
"Experimental": "Kokeellinen",
"LabelStereoDownmixAlgorithm": "Stereoäänen alasmiksausalgoritmi:",
@ -1697,5 +1697,22 @@
"ResolutionMatchSource": "Vastaa lähdettä",
"PreferEmbeddedExtrasTitlesOverFileNames": "Suosi lisämateriaaleille upotettuja otsikoita tiedostonimien sijaan",
"PreferEmbeddedExtrasTitlesOverFileNamesHelp": "Lisämateriaaleilla on usein sama otsikko kuin niiden isännällä. Valitse tämä käyttääksesi silti upotettuja otsikoita.",
"SecondarySubtitles": "Toissijaiset tekstitykset"
"SecondarySubtitles": "Toissijaiset tekstitykset",
"MediaInfoElPresentFlag": "DV EL havaittu",
"SubtitleBlack": "Musta",
"SubtitleCyan": "Syaani",
"SubtitleGray": "Harmaa",
"SubtitleGreen": "Vihreä",
"SubtitleLightGray": "Vaaleanharmaa",
"SubtitleMagenta": "Magenta",
"SubtitleRed": "Punainen",
"SubtitleWhite": "Valkoinen",
"SubtitleYellow": "Keltainen",
"MediaInfoDvBlSignalCompatibilityId": "DV BL -signaaliyhteensopivuuden ID",
"SubtitleBlue": "Sininen",
"Featurette": "Oheisfilmi",
"Short": "Lyhytfilmi",
"MediaInfoBlPresentFlag": "DV BL havaittu",
"MediaInfoRpuPresentFlag": "DV RPU havaittu",
"MediaInfoDvVersionMinor": "DV-väliversio"
}

View file

@ -234,7 +234,7 @@
"HeaderApiKeys": "Clés API",
"HeaderApiKeysHelp": "Les applications externes ont besoin d'une clé d'API pour communiquer avec le serveur. Les clés sont distribuées lors d'une connexion avec un compte normal ou en accordant manuellement une clé à une application.",
"HeaderApp": "Application",
"HeaderAppearsOn": "Apparait dans",
"HeaderAppearsOn": "Apparaît dans",
"HeaderAudioBooks": "Livres audio",
"HeaderAudioSettings": "Réglages audio",
"HeaderBlockItemsWithNoRating": "Bloquer les éléments avec des informations de classification inconnues ou n'en disposant pas :",

View file

@ -109,7 +109,7 @@
"Connect": "Verbind",
"ContinueWatching": "Verderkijken",
"Continuing": "Wordt vervolgd",
"CriticRating": "Critici-beoordeling",
"CriticRating": "Beoordeling critici",
"CustomDlnaProfilesHelp": "Maak een aangepast profiel om een nieuw apparaat aan te maken of overschrijf een systeemprofiel.",
"DateAdded": "Datum toegevoegd",
"DatePlayed": "Datum afgespeeld",
@ -787,7 +787,7 @@
"NewEpisodesOnly": "Alleen nieuwe afleveringen",
"News": "Nieuws",
"Next": "Volgende",
"NextUp": "Hierna",
"NextUp": "Volgende",
"No": "Nee",
"NoNewDevicesFound": "Er zijn geen nieuwe apparaten gevonden. Sluit deze melding en voer handmatig de apparaat gegevens in om een nieuwe tuner toe te voegen.",
"MessageNoNextUpItems": "Niets gevonden. Start met kijken!",
@ -822,7 +822,7 @@
"OptionAutomaticallyGroupSeriesHelp": "Series die verspreid zijn over meerdere mappen binnen deze bibliotheek worden automatisch samengevoegd tot één serie.",
"OptionBluray": "BD",
"OptionCommunityRating": "Beoordeling gemeenschap",
"OptionCriticRating": "Beoordeling door critici",
"OptionCriticRating": "Beoordeling critici",
"OptionCustomUsers": "Aangepast",
"OptionDaily": "Dagelijks",
"OptionDateAdded": "Datum toegevoegd",
@ -1544,7 +1544,7 @@
"LabelSyncPlaySettingsSkipToSyncHelp": "Synchronisatie correctiemethode die bestaat uit het zoeken naar de geschatte positie. Synchronisatie Correctie moet ingeschakeld zijn.",
"MessageSent": "Bericht verzonden.",
"Mixer": "Mixer",
"UseEpisodeImagesInNextUpHelp": "'Hierna'- en 'Verderkijken'-secties zullen afleveringsafbeeldingen gebruiken als thumbnails in plaats van de primaire thumbnail van de serie.",
"UseEpisodeImagesInNextUpHelp": "Secties 'Volgende' en 'Verderkijken' zullen afleveringsafbeeldingen gebruiken als miniaturen in plaats van de primaire miniatuur van de serie.",
"SetUsingLastTracks": "Ondertitel/Audio-sporen instellen met vorig item",
"SetUsingLastTracksHelp": "Probeer de ondertiteling/het audiospoor in te stellen op de video die het meest overeenkomt met de laatste video.",
"TextSent": "Tekst verzonden.",
@ -1556,11 +1556,11 @@
"VideoProfileNotSupported": "Het profiel van de videocodec wordt niet ondersteund",
"Lyricist": "Tekstschrijver",
"NextChapter": "Volgend hoofdstuk",
"LabelMaxDaysForNextUp": "Maximaal dagen in 'Hierna':",
"LabelMaxDaysForNextUpHelp": "Zet het maximaal aantal dagen dat een serie in de 'Hierna'-lijst staat zonder het te kijken.",
"LabelMaxDaysForNextUp": "Maximaal dagen in 'Volgende':",
"LabelMaxDaysForNextUpHelp": "Stel het maximaal aantal dagen in dat een serie in de 'Volgende'-lijst staat zonder het te kijken.",
"PreviousChapter": "Vorig hoofdstuk",
"Remixer": "Remixer",
"UseEpisodeImagesInNextUp": "Gebruik afleveringscovers in de secties 'Hierna' en 'Verderkijken'",
"UseEpisodeImagesInNextUp": "Gebruik afleveringscovers in de secties 'Volgende' en 'Verderkijken'",
"EnableGamepadHelp": "Luister naar input van alle aangesloten controllers. (Vereist weergavemodus 'Tv')",
"VideoCodecNotSupported": "De videocodec wordt niet ondersteund",
"AudioBitrateNotSupported": "De bitrate van de audio wordt niet ondersteund",
@ -1625,11 +1625,11 @@
"ButtonBackspace": "Backspace",
"StoryArc": "Verhaallijn",
"ItemDetails": "Itemdetails",
"EnableRewatchingNextUp": "Opnieuw kijken inschakelen in Hierna",
"EnableRewatchingNextUp": "Opnieuw kijken inschakelen in Volgende",
"Bold": "Vetgedrukt",
"LabelTextWeight": "Tekstdikte:",
"HomeVideosPhotos": "Homevideo's en foto's",
"EnableRewatchingNextUpHelp": "Laat reeds gekeken afleveringen zien in 'Hierna'-secties.",
"EnableRewatchingNextUpHelp": "Laat reeds gekeken afleveringen zien in sectie 'Volgende'.",
"ContainerBitrateExceedsLimit": "De bitrate van de video overschrijdt de limiet",
"LabelMaxVideoResolution": "Maximaal toegestane resolutie voor transcoderingen",
"UnknownAudioStreamInfo": "De audio stream info is onbekend",
@ -1674,7 +1674,7 @@
"DeletedScene": "Verwijderde scene",
"BehindTheScenes": "Achter de scenes",
"Trailer": "Trailer",
"Clip": "Korte film",
"Clip": "Clip",
"SelectAll": "Selecteer alles",
"DirectPlayError": "Er is een fout opgetreden tijdens het starten van direct afspelen",
"OptionDateShowAdded": "Datum Serie Toegevoegd",
@ -1713,5 +1713,7 @@
"SubtitleMagenta": "Magenta",
"SubtitleRed": "Rood",
"SubtitleWhite": "Wit",
"SubtitleYellow": "Geel"
"SubtitleYellow": "Geel",
"Featurette": "Featurette",
"Short": "Korte film"
}

View file

@ -1621,7 +1621,7 @@
"DeletedScene": "删减场景",
"BehindTheScenes": "幕后花絮",
"Trailer": "预告片",
"Clip": "花絮",
"Clip": "片段",
"ButtonExitApp": "退出应用",
"ShowParentImages": "显示系列图片",
"AllowEmbeddedSubtitlesAllowTextOption": "允许文本",
@ -1714,5 +1714,7 @@
"SubtitleGreen": "绿色",
"SubtitleMagenta": "品红色",
"SubtitleRed": "红色",
"SubtitleYellow": "黄色"
"SubtitleYellow": "黄色",
"Featurette": "花絮",
"Short": "短片"
}

View file

@ -650,7 +650,7 @@
"LabelEmbedAlbumArtDidl": "於 DIDL 中嵌入專輯封面",
"LabelEasyPinCode": "簡易PIN代碼",
"LabelDynamicExternalId": "{0} Id:",
"LabelDropSubtitleHere": "將字幕檔到這裡,或點擊瀏覽。",
"LabelDropSubtitleHere": "將字幕檔拖動到這裡,或點擊瀏覽。",
"LabelDropShadow": "陰影:",
"LabelDroppedFrames": "丟棄的幀:",
"LabelDropImageHere": "拖移圖片到這裡,或是點擊來選取。",
@ -1096,5 +1096,11 @@
"LabelSyncPlaySettingsSyncCorrection": "同步校正",
"HomeVideosPhotos": "家庭影片及相片",
"MessageConfirmRevokeApiKey": "你是否確定要廢除此 API Key有關程序將無法再連接此伺服器。",
"LabelSyncPlaySettingsExtraTimeOffsetHelp": "為目標裝置調較 SyncPlay 延遲時間(毫秒)以改善不同步問題,請小心調較。"
"LabelSyncPlaySettingsExtraTimeOffsetHelp": "為目標裝置調較 SyncPlay 延遲時間(毫秒)以改善不同步問題,請小心調較。",
"Experimental": "試驗性",
"HeaderDummyChapter": "章節圖片",
"IgnoreDtsHelp": "禁用此選項或可解決部份問題,如無法正常播放外部音訊。",
"DownloadAll": "全部下載",
"LabelDummyChapterDuration": "間距:",
"LabelDummyChapterDurationHelp": "章節圖片擷取間距(秒)"
}

View file

@ -2,6 +2,16 @@ function toLocaleStringSupportsOptions() {
return !!(typeof Intl === 'object' && Intl && typeof Intl.NumberFormat === 'function');
}
/**
* Generates a random integer in a given range.
* @param {number} min - Minimum of the range.
* @param {number} max - Maximum of the range.
* @returns {number} Randomly generated number.
*/
export function randomInt(min: number, max: number): number {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
/**
* Gets the value of a number formatted as a perentage.
* @param {number} value The value as a number.