mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add configurable encoding params
This commit is contained in:
parent
cb4d1e1643
commit
3842bf80e6
13 changed files with 119 additions and 35 deletions
|
@ -1036,7 +1036,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
||||||
if (options.coverImage || imgInfo.coverImage) {
|
if (options.coverImage || imgInfo.coverImage) {
|
||||||
cardImageContainerClass += ' coveredImage';
|
cardImageContainerClass += ' coveredImage';
|
||||||
|
|
||||||
if (item.MediaType == 'Photo' || item.Type == 'PhotoAlbum' || item.Type == 'Folder') {
|
if (item.MediaType == 'Photo' || item.Type == 'PhotoAlbum' || item.Type == 'Folder' || item.Type == 'Program') {
|
||||||
cardImageContainerClass += ' coveredImage-noScale';
|
cardImageContainerClass += ' coveredImage-noScale';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: .5em 0;
|
padding: .5em 0;
|
||||||
|
/* Override size from librarymenu */
|
||||||
|
font-size: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dockedtabs-tab-button {
|
.dockedtabs-tab-button {
|
||||||
|
|
|
@ -226,7 +226,7 @@
|
||||||
';
|
';
|
||||||
|
|
||||||
if (appHost.supports('sync')) {
|
if (appHost.supports('sync')) {
|
||||||
html += '<button is="emby-button" class="dockedtabs-tab-button emby-tab-button" data-index="4">\
|
html += '<button is="emby-button" class="dockedtabs-tab-button docked-tab-syncdownloads emby-tab-button hide" data-index="4">\
|
||||||
<div class="dockedtabs-tab-button-foreground emby-button-foreground"><i class="dockedtabs-tab-button-icon md-icon">file_download</i><div>' + globalize.translate('Downloads') + '</div></div>\
|
<div class="dockedtabs-tab-button-foreground emby-button-foreground"><i class="dockedtabs-tab-button-icon md-icon">file_download</i><div>' + globalize.translate('Downloads') + '</div></div>\
|
||||||
</button>\
|
</button>\
|
||||||
';
|
';
|
||||||
|
@ -270,6 +270,15 @@
|
||||||
element.querySelector('.docked-tab-livetv').classList.add('hide');
|
element.querySelector('.docked-tab-livetv').classList.add('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var downloadsTab = element.querySelector('.docked-tab-syncdownloads');
|
||||||
|
if (downloadsTab) {
|
||||||
|
if (user.Policy.EnableSync) {
|
||||||
|
downloadsTab.classList.remove('hide');
|
||||||
|
} else {
|
||||||
|
downloadsTab.classList.add('hide');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (user.Policy.IsAdministrator) {
|
if (user.Policy.IsAdministrator) {
|
||||||
element.querySelector('.docked-tab-manageserver').classList.remove('hide');
|
element.querySelector('.docked-tab-manageserver').classList.remove('hide');
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -86,11 +86,6 @@
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboardDocument .libraryMenuButtonText {
|
|
||||||
font-size: 125%;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboardDocument .mainDrawerPanelContent {
|
.dashboardDocument .mainDrawerPanelContent {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
|
@ -87,7 +87,6 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-left: .75em;
|
margin-left: .75em;
|
||||||
font-size: 108%;
|
font-size: 108%;
|
||||||
|
|
||||||
/* Avoid pushing right header off the screen */
|
/* Avoid pushing right header off the screen */
|
||||||
flex-shrink: 1;
|
flex-shrink: 1;
|
||||||
}
|
}
|
||||||
|
@ -103,6 +102,7 @@
|
||||||
height: 50px;
|
height: 50px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hiddenViewMenuBar .viewMenuBar {
|
.hiddenViewMenuBar .viewMenuBar {
|
||||||
|
@ -123,6 +123,10 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.emby-tabs {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
.ui-body-b .libraryViewNav {
|
.ui-body-b .libraryViewNav {
|
||||||
box-shadow: 0 2px 2px 0 rgba(0,0,0,.14),1px 5px 1px rgba(0,0,0,.12);
|
box-shadow: 0 2px 2px 0 rgba(0,0,0,.14),1px 5px 1px rgba(0,0,0,.12);
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|
|
@ -43,10 +43,6 @@ body:not(.dashboardDocument) .mainDrawerButton {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.libraryViewNav {
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1, h1 a {
|
h1, h1 a {
|
||||||
font-weight: 400 !important;
|
font-weight: 400 !important;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<div class="fieldDescription">${LabelHardwareAccelerationTypeHelp}</div>
|
<div class="fieldDescription">${LabelHardwareAccelerationTypeHelp}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputContainer hide fldVaapiDevice">
|
<div class="inputContainer hide fldVaapiDevice">
|
||||||
<input is="emby-input" type="text" id="txtVaapiDevice" label="${LabelVaapiDevice}"/>
|
<input is="emby-input" type="text" id="txtVaapiDevice" label="${LabelVaapiDevice}" />
|
||||||
<div class="fieldDescription">${LabelVaapiDeviceHelp}</div>
|
<div class="fieldDescription">${LabelVaapiDeviceHelp}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="selectContainer">
|
<div class="selectContainer">
|
||||||
|
@ -73,6 +73,26 @@
|
||||||
<div class="fieldDescription">${LabelDownMixAudioScaleHelp}</div>
|
<div class="fieldDescription">${LabelDownMixAudioScaleHelp}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="selectContainer">
|
||||||
|
<select is="emby-select" id="selectH264Preset" label="${LabelH264EncodingPreset}">
|
||||||
|
<option value="">${OptionAuto}</option>
|
||||||
|
<option value="veryslow">veryslow</option>
|
||||||
|
<option value="slower">slower</option>
|
||||||
|
<option value="slow">slow</option>
|
||||||
|
<option value="medium">medium</option>
|
||||||
|
<option value="fast">fast</option>
|
||||||
|
<option value="faster">faster</option>
|
||||||
|
<option value="veryfast">veryfast</option>
|
||||||
|
<option value="superfast">superfast</option>
|
||||||
|
<option value="ultrafast">ultrafast</option>
|
||||||
|
</select>
|
||||||
|
<div class="fieldDescription">${H264EncodingPresetHelp}</div>
|
||||||
|
</div>
|
||||||
|
<div class="inputContainer">
|
||||||
|
<input is="emby-input" type="number" id="txtH264Crf" pattern="[0-9]*" min="0" max="51" step="1" label="${LabelH264Crf}" />
|
||||||
|
<div class="fieldDescription">${H264CrfHelp}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<button is="emby-button" type="submit" class="raised submit block"><i class="md-icon">check</i><span>${ButtonSave}</span></button>
|
<button is="emby-button" type="submit" class="raised submit block"><i class="md-icon">check</i><span>${ButtonSave}</span></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -15,6 +15,9 @@
|
||||||
<div class="emby-button-foreground">${TabRecordings}</div>
|
<div class="emby-button-foreground">${TabRecordings}</div>
|
||||||
</button>
|
</button>
|
||||||
<button is="emby-button" class="emby-tab-button" data-index="4">
|
<button is="emby-button" class="emby-tab-button" data-index="4">
|
||||||
|
<div class="emby-button-foreground">${HeaderSchedule}</div>
|
||||||
|
</button>
|
||||||
|
<button is="emby-button" class="emby-tab-button" data-index="5">
|
||||||
<div class="emby-button-foreground">${TabSeries}</div>
|
<div class="emby-button-foreground">${TabSeries}</div>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -82,10 +85,6 @@
|
||||||
<div is="emby-itemscontainer" class="recordingItems itemsContainer"></div>
|
<div is="emby-itemscontainer" class="recordingItems itemsContainer"></div>
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
<div id="upcomingRecordings" class="homePageSection hide">
|
|
||||||
<div class="recordingItems"></div>
|
|
||||||
<br />
|
|
||||||
</div>
|
|
||||||
<div id="recordingGroups" class="hide homePageSection">
|
<div id="recordingGroups" class="hide homePageSection">
|
||||||
<div>
|
<div>
|
||||||
<h1 class="listHeader" style="display: inline-block; vertical-align: middle;">${HeaderAllRecordings}</h1>
|
<h1 class="listHeader" style="display: inline-block; vertical-align: middle;">${HeaderAllRecordings}</h1>
|
||||||
|
@ -94,7 +93,13 @@
|
||||||
<div id="recordingGroupItems"></div>
|
<div id="recordingGroupItems"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pageTabContent ehsContent" id="seriesTab" data-index="4">
|
<div class="pageTabContent ehsContent" id="scheduleTab" data-index="4">
|
||||||
|
<div id="upcomingRecordings" class="homePageSection hide">
|
||||||
|
<div class="recordingItems"></div>
|
||||||
|
<br />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="pageTabContent ehsContent" id="seriesTab" data-index="5">
|
||||||
<div style="max-width: 700px; margin: 0 auto;" id="items">
|
<div style="max-width: 700px; margin: 0 auto;" id="items">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
$('#txtTranscodingTempPath', page).val(config.TranscodingTempPath || '');
|
$('#txtTranscodingTempPath', page).val(config.TranscodingTempPath || '');
|
||||||
$('#txtVaapiDevice', page).val(config.VaapiDevice || '');
|
$('#txtVaapiDevice', page).val(config.VaapiDevice || '');
|
||||||
|
|
||||||
|
page.querySelector('#selectH264Preset').value = config.H264Preset || '';
|
||||||
|
page.querySelector('#txtH264Crf').value = config.H264Crf || '';
|
||||||
|
|
||||||
var selectEncoderPath = page.querySelector('#selectEncoderPath');
|
var selectEncoderPath = page.querySelector('#selectEncoderPath');
|
||||||
|
|
||||||
selectEncoderPath.value = systemInfo.EncoderLocationType;
|
selectEncoderPath.value = systemInfo.EncoderLocationType;
|
||||||
|
@ -71,6 +74,9 @@
|
||||||
config.HardwareAccelerationType = $('#selectVideoDecoder', form).val();
|
config.HardwareAccelerationType = $('#selectVideoDecoder', form).val();
|
||||||
config.VaapiDevice = $('#txtVaapiDevice', form).val();
|
config.VaapiDevice = $('#txtVaapiDevice', form).val();
|
||||||
|
|
||||||
|
config.H264Preset = form.querySelector('#selectH264Preset').value;
|
||||||
|
config.H264Crf = parseInt(form.querySelector('#txtH264Crf').value || '0');
|
||||||
|
|
||||||
config.EnableThrottling = form.querySelector('#chkEnableThrottle').checked;
|
config.EnableThrottling = form.querySelector('#chkEnableThrottle').checked;
|
||||||
|
|
||||||
ApiClient.updateNamedConfiguration("encoding", config).then(function () {
|
ApiClient.updateNamedConfiguration("encoding", config).then(function () {
|
||||||
|
|
|
@ -155,21 +155,10 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderUpcomingRecordings(context) {
|
|
||||||
|
|
||||||
ApiClient.getLiveTvTimers({
|
|
||||||
IsActive: false
|
|
||||||
}).then(function (result) {
|
|
||||||
|
|
||||||
renderTimers(context.querySelector('#upcomingRecordings'), result.Items);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function reload(context) {
|
function reload(context) {
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
renderUpcomingRecordings(context);
|
|
||||||
renderActiveRecordings(context);
|
renderActiveRecordings(context);
|
||||||
renderLatestRecordings(context);
|
renderLatestRecordings(context);
|
||||||
|
|
||||||
|
@ -191,9 +180,6 @@
|
||||||
tabContent.querySelector('#activeRecordings .recordingItems').addEventListener('timercancelled', function () {
|
tabContent.querySelector('#activeRecordings .recordingItems').addEventListener('timercancelled', function () {
|
||||||
reload(tabContent);
|
reload(tabContent);
|
||||||
});
|
});
|
||||||
tabContent.querySelector('#upcomingRecordings .recordingItems').addEventListener('timercancelled', function () {
|
|
||||||
reload(tabContent);
|
|
||||||
});
|
|
||||||
|
|
||||||
self.renderTab = function () {
|
self.renderTab = function () {
|
||||||
reload(tabContent);
|
reload(tabContent);
|
||||||
|
|
53
dashboard-ui/scripts/livetvschedule.js
Normal file
53
dashboard-ui/scripts/livetvschedule.js
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
define(['components/categorysyncbuttons', 'cardBuilder', 'scripts/livetvcomponents', 'emby-button', 'listViewStyle', 'emby-itemscontainer'], function (categorysyncbuttons, cardBuilder) {
|
||||||
|
|
||||||
|
function renderTimers(context, timers, options) {
|
||||||
|
|
||||||
|
LiveTvHelpers.getTimersHtml(timers, options).then(function (html) {
|
||||||
|
|
||||||
|
var elem = context;
|
||||||
|
|
||||||
|
if (html) {
|
||||||
|
elem.classList.remove('hide');
|
||||||
|
} else {
|
||||||
|
elem.classList.add('hide');
|
||||||
|
}
|
||||||
|
|
||||||
|
elem.querySelector('.recordingItems').innerHTML = html;
|
||||||
|
|
||||||
|
ImageLoader.lazyChildren(elem);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderUpcomingRecordings(context) {
|
||||||
|
|
||||||
|
ApiClient.getLiveTvTimers({
|
||||||
|
IsActive: false
|
||||||
|
}).then(function (result) {
|
||||||
|
|
||||||
|
renderTimers(context.querySelector('#upcomingRecordings'), result.Items);
|
||||||
|
Dashboard.hideLoadingMsg();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function reload(context) {
|
||||||
|
|
||||||
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
|
renderUpcomingRecordings(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
return function (view, params, tabContent) {
|
||||||
|
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
categorysyncbuttons.init(tabContent);
|
||||||
|
tabContent.querySelector('#upcomingRecordings .recordingItems').addEventListener('timercancelled', function () {
|
||||||
|
reload(tabContent);
|
||||||
|
});
|
||||||
|
|
||||||
|
self.renderTab = function () {
|
||||||
|
reload(tabContent);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
});
|
|
@ -101,7 +101,7 @@
|
||||||
|
|
||||||
var html = cardBuilder.getCardsHtml({
|
var html = cardBuilder.getCardsHtml({
|
||||||
items: items,
|
items: items,
|
||||||
shape: shape || (enableScrollX() ? 'autooverflow' : 'auto'),
|
shape: shape || (enableScrollX() ? 'overflowBackdrop' : 'backdrop'),
|
||||||
showTitle: true,
|
showTitle: true,
|
||||||
centerText: true,
|
centerText: true,
|
||||||
coverImage: true,
|
coverImage: true,
|
||||||
|
@ -169,6 +169,10 @@
|
||||||
depends.push('scripts/livetvrecordings');
|
depends.push('scripts/livetvrecordings');
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
|
document.body.classList.remove('autoScrollY');
|
||||||
|
depends.push('scripts/livetvschedule');
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
document.body.classList.remove('autoScrollY');
|
document.body.classList.remove('autoScrollY');
|
||||||
depends.push('scripts/livetvseriestimers');
|
depends.push('scripts/livetvseriestimers');
|
||||||
break;
|
break;
|
||||||
|
@ -200,7 +204,7 @@
|
||||||
|
|
||||||
var viewTabs = view.querySelector('.libraryViewNav');
|
var viewTabs = view.querySelector('.libraryViewNav');
|
||||||
|
|
||||||
libraryBrowser.configurePaperLibraryTabs(view, viewTabs, view.querySelectorAll('.pageTabContent'), [0, 2, 3, 4]);
|
libraryBrowser.configurePaperLibraryTabs(view, viewTabs, view.querySelectorAll('.pageTabContent'), [0, 2, 3, 4, 5]);
|
||||||
|
|
||||||
viewTabs.addEventListener('tabchange', function (e) {
|
viewTabs.addEventListener('tabchange', function (e) {
|
||||||
loadTab(view, parseInt(e.detail.selectedTabIndex));
|
loadTab(view, parseInt(e.detail.selectedTabIndex));
|
||||||
|
|
|
@ -2127,5 +2127,9 @@
|
||||||
"OptionExtractChapterImage": "Enable chapter image extraction",
|
"OptionExtractChapterImage": "Enable chapter image extraction",
|
||||||
"Downloads": "Downloads",
|
"Downloads": "Downloads",
|
||||||
"OptionEnableExternalContentInSuggestions": "Enable external content in suggestions",
|
"OptionEnableExternalContentInSuggestions": "Enable external content in suggestions",
|
||||||
"OptionEnableExternalContentInSuggestionsHelp": "Allow internet trailers and live tv programs to be included within suggested content."
|
"OptionEnableExternalContentInSuggestionsHelp": "Allow internet trailers and live tv programs to be included within suggested content.",
|
||||||
|
"LabelH264EncodingPreset": "H264 encoding preset:",
|
||||||
|
"H264EncodingPresetHelp": "Choose a faster value to improve performance, or a slower value to improve quality.",
|
||||||
|
"LabelH264Crf": "H264 encoding CRF:",
|
||||||
|
"H264CrfHelp": "The Constant Rate Factor (CRF) is the default quality setting for the x264 encoder. You can set the values between 0 and 51, where lower values would result in better quality (at the expense of higher file sizes). Sane values are between 18 and 28. The default for x264 is 23, so you can use this as a starting point."
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue