mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Remove unused Screenshot code
This commit is contained in:
parent
827dd90a6f
commit
b217e39f26
8 changed files with 3 additions and 64 deletions
|
@ -29,7 +29,6 @@
|
|||
<option value="Disc">${Disc}</option>
|
||||
<option value="Logo">${Logo}</option>
|
||||
<option value="Menu">${Menu}</option>
|
||||
<option value="Screenshot">${Screenshot}</option>
|
||||
<option value="Thumb">${Thumb}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
|
|
@ -45,7 +45,6 @@ import template from './imageOptionsEditor.template.html';
|
|||
function loadValues(context, itemType, options, availableOptions) {
|
||||
const supportedImageTypes = availableOptions.SupportedImageTypes || [];
|
||||
setVisibilityOfBackdrops(context.querySelector('.backdropFields'), supportedImageTypes.includes('Backdrop'));
|
||||
setVisibilityOfBackdrops(context.querySelector('.screenshotFields'), supportedImageTypes.includes('Screenshot'));
|
||||
Array.prototype.forEach.call(context.querySelectorAll('.imageType'), i => {
|
||||
const imageType = i.getAttribute('data-imagetype');
|
||||
const container = dom.parentWithTag(i, 'LABEL');
|
||||
|
@ -65,9 +64,6 @@ import template from './imageOptionsEditor.template.html';
|
|||
const backdropConfig = getImageConfig(options, availableOptions, 'Backdrop', itemType);
|
||||
context.querySelector('#txtMaxBackdrops').value = backdropConfig.Limit;
|
||||
context.querySelector('#txtMinBackdropDownloadWidth').value = backdropConfig.MinWidth;
|
||||
const screenshotConfig = getImageConfig(options, availableOptions, 'Screenshot', itemType);
|
||||
context.querySelector('#txtMaxScreenshots').value = screenshotConfig.Limit;
|
||||
context.querySelector('#txtMinScreenshotDownloadWidth').value = screenshotConfig.MinWidth;
|
||||
}
|
||||
|
||||
function saveValues(context, options) {
|
||||
|
@ -83,11 +79,6 @@ import template from './imageOptionsEditor.template.html';
|
|||
Limit: context.querySelector('#txtMaxBackdrops').value,
|
||||
MinWidth: context.querySelector('#txtMinBackdropDownloadWidth').value
|
||||
});
|
||||
options.ImageOptions.push({
|
||||
Type: 'Screenshot',
|
||||
Limit: context.querySelector('#txtMaxScreenshots').value,
|
||||
MinWidth: context.querySelector('#txtMinScreenshotDownloadWidth').value
|
||||
});
|
||||
}
|
||||
|
||||
function showEditor(itemType, options, availableOptions) {
|
||||
|
|
|
@ -62,17 +62,6 @@
|
|||
<input is="emby-input" type="number" id="txtMinBackdropDownloadWidth" pattern="[0-9]*" required="required" min="0" label="${LabelMinBackdropDownloadWidth}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="screenshotFields">
|
||||
<div class="inputContainer">
|
||||
<input is="emby-input" type="number" id="txtMaxScreenshots" pattern="[0-9]*" required="required" min="0" label="${LabelMaxScreenshotsPerItem}" />
|
||||
</div>
|
||||
|
||||
<div class="inputContainer">
|
||||
<input is="emby-input" type="number" id="txtMinScreenshotDownloadWidth" pattern="[0-9]*" required="required" min="0" label="${LabelMinScreenshotDownloadWidth}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
<option value="Disc">${Disc}</option>
|
||||
<option value="Logo">${Logo}</option>
|
||||
<option value="Menu">${Menu}</option>
|
||||
<option value="Screenshot">${Screenshot}</option>
|
||||
<option value="Thumb">${Thumb}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
|
|
@ -74,7 +74,6 @@ import template from './imageeditor.template.html';
|
|||
apiClient.getItemImageInfos(currentItem.Id).then(function (imageInfos) {
|
||||
renderStandardImages(page, apiClient, item, imageInfos, providers);
|
||||
renderBackdrops(page, apiClient, item, imageInfos, providers);
|
||||
renderScreenshots(page, apiClient, item, imageInfos, providers);
|
||||
loading.hide();
|
||||
|
||||
if (layoutManager.tv) {
|
||||
|
@ -91,8 +90,6 @@ import template from './imageeditor.template.html';
|
|||
|
||||
if (type === 'Backdrop') {
|
||||
options.tag = item.BackdropImageTags[index];
|
||||
} else if (type === 'Screenshot') {
|
||||
options.tag = item.ScreenshotImageTags[index];
|
||||
} else if (type === 'Primary') {
|
||||
options.tag = item.PrimaryImageTag || item.ImageTags[type];
|
||||
} else {
|
||||
|
@ -161,7 +158,7 @@ import template from './imageeditor.template.html';
|
|||
if (enableFooterButtons) {
|
||||
html += '<div class="cardText cardTextCentered">';
|
||||
|
||||
if (image.ImageType === 'Backdrop' || image.ImageType === 'Screenshot') {
|
||||
if (image.ImageType === 'Backdrop') {
|
||||
if (index > 0) {
|
||||
html += '<button type="button" is="paper-icon-button-light" class="btnMoveImage autoSize" data-imagetype="' + image.ImageType + '" data-index="' + image.ImageIndex + '" data-newindex="' + (image.ImageIndex - 1) + '" title="' + globalize.translate('MoveLeft') + '"><span class="material-icons chevron_left"></span></button>';
|
||||
} else {
|
||||
|
@ -242,7 +239,7 @@ import template from './imageeditor.template.html';
|
|||
|
||||
function renderStandardImages(page, apiClient, item, imageInfos, imageProviders) {
|
||||
const images = imageInfos.filter(function (i) {
|
||||
return i.ImageType !== 'Screenshot' && i.ImageType !== 'Backdrop' && i.ImageType !== 'Chapter';
|
||||
return i.ImageType !== 'Backdrop' && i.ImageType !== 'Chapter';
|
||||
});
|
||||
|
||||
renderImages(page, item, apiClient, images, imageProviders, page.querySelector('#images'));
|
||||
|
@ -263,21 +260,6 @@ import template from './imageeditor.template.html';
|
|||
}
|
||||
}
|
||||
|
||||
function renderScreenshots(page, apiClient, item, imageInfos, imageProviders) {
|
||||
const images = imageInfos.filter(function (i) {
|
||||
return i.ImageType === 'Screenshot';
|
||||
}).sort(function (a, b) {
|
||||
return a.ImageIndex - b.ImageIndex;
|
||||
});
|
||||
|
||||
if (images.length) {
|
||||
page.querySelector('#screenshotsContainer', page).classList.remove('hide');
|
||||
renderImages(page, item, apiClient, images, imageProviders, page.querySelector('#screenshots'));
|
||||
} else {
|
||||
page.querySelector('#screenshotsContainer', page).classList.add('hide');
|
||||
}
|
||||
}
|
||||
|
||||
function showImageDownloader(page, imageType) {
|
||||
import('../imageDownloader/imageDownloader').then((ImageDownloader) => {
|
||||
ImageDownloader.show(
|
||||
|
@ -311,7 +293,7 @@ import template from './imageeditor.template.html';
|
|||
id: 'delete'
|
||||
});
|
||||
|
||||
if (type === 'Backdrop' || type === 'Screenshot') {
|
||||
if (type === 'Backdrop') {
|
||||
if (index > 0) {
|
||||
commands.push({
|
||||
name: globalize.translate('MoveLeft'),
|
||||
|
|
|
@ -37,20 +37,6 @@
|
|||
</div>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div id="screenshotsContainer" class="hide">
|
||||
<div class="imageEditor-buttons">
|
||||
<h2 style="margin: 0;">${Screenshots}</h2>
|
||||
<button type="button" is="emby-button" class="btnBrowseAllImages fab mini autoSize" style="margin-left: 1em;" data-imagetype="Screenshot">
|
||||
<span class="material-icons search" aria-hidden="true"></span>
|
||||
</button>
|
||||
<button type="button" is="emby-button" class="btnOpenUploadMenu fab mini hide" style="margin-left: .5em;" data-imagetype="Screenshot">
|
||||
<span class="material-icons add" aria-hidden="true"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div id="screenshots" class="itemsContainer vertical-wrap">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -128,9 +128,6 @@ function processGeneralCommand(cmd, apiClient) {
|
|||
case 'ToggleContextMenu':
|
||||
// todo
|
||||
break;
|
||||
case 'TakeScreenShot':
|
||||
// todo
|
||||
break;
|
||||
case 'SendKey':
|
||||
// todo
|
||||
break;
|
||||
|
|
|
@ -729,7 +729,6 @@
|
|||
"LabelMaxParentalRating": "Maximum allowed parental rating:",
|
||||
"LabelMaxResumePercentage": "Maximum resume percentage:",
|
||||
"LabelMaxResumePercentageHelp": "Titles are assumed fully played if stopped after this time.",
|
||||
"LabelMaxScreenshotsPerItem": "Maximum number of screenshots per item:",
|
||||
"LabelMaxStreamingBitrate": "Maximum streaming quality:",
|
||||
"LabelMaxStreamingBitrateHelp": "Specify a maximum bitrate when streaming.",
|
||||
"LabelMessageText": "Message text:",
|
||||
|
@ -751,7 +750,6 @@
|
|||
"LabelMinResumeDurationHelp": "The shortest video length in seconds that will save playback location and let you resume.",
|
||||
"LabelMinResumePercentage": "Minimum resume percentage:",
|
||||
"LabelMinResumePercentageHelp": "Titles are assumed unplayed if stopped before this time.",
|
||||
"LabelMinScreenshotDownloadWidth": "Minimum screenshot download width:",
|
||||
"LabelModelDescription": "Model description:",
|
||||
"LabelModelName": "Model name:",
|
||||
"LabelModelNumber": "Model number:",
|
||||
|
@ -1380,8 +1378,6 @@
|
|||
"ScanForNewAndUpdatedFiles": "Scan for new and updated files",
|
||||
"ScanLibrary": "Scan library",
|
||||
"Schedule": "Schedule",
|
||||
"Screenshot": "Screenshot",
|
||||
"Screenshots": "Screenshots",
|
||||
"Search": "Search",
|
||||
"SearchForCollectionInternetMetadata": "Search the internet for artwork and metadata",
|
||||
"SearchForMissingMetadata": "Search for missing metadata",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue