1
0
Fork 0
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:
Luke Pulverenti 2016-09-04 11:01:31 -04:00
parent cb4d1e1643
commit 3842bf80e6
13 changed files with 119 additions and 35 deletions

View file

@ -1036,7 +1036,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
if (options.coverImage || imgInfo.coverImage) {
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';
}
}

View file

@ -2,6 +2,8 @@
flex-grow: 1;
display: flex;
padding: .5em 0;
/* Override size from librarymenu */
font-size: inherit;
}
.dockedtabs-tab-button {

View file

@ -226,7 +226,7 @@
';
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>\
</button>\
';
@ -270,6 +270,15 @@
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) {
element.querySelector('.docked-tab-manageserver').classList.remove('hide');
} else {

View file

@ -86,11 +86,6 @@
display: none !important;
}
.dashboardDocument .libraryMenuButtonText {
font-size: 125%;
margin-left: 0;
}
.dashboardDocument .mainDrawerPanelContent {
position: absolute;
top: 0;

View file

@ -87,7 +87,6 @@
align-items: center;
margin-left: .75em;
font-size: 108%;
/* Avoid pushing right header off the screen */
flex-shrink: 1;
}
@ -103,6 +102,7 @@
height: 50px;
display: flex;
flex-direction: column;
font-size: 13px;
}
.hiddenViewMenuBar .viewMenuBar {
@ -123,6 +123,10 @@
align-items: center;
}
.emby-tabs {
font-size: 13px;
}
.ui-body-b .libraryViewNav {
box-shadow: 0 2px 2px 0 rgba(0,0,0,.14),1px 5px 1px rgba(0,0,0,.12);
position: fixed;

View file

@ -43,10 +43,6 @@ body:not(.dashboardDocument) .mainDrawerButton {
display: none;
}
.libraryViewNav {
font-size: 12px;
}
h1, h1 a {
font-weight: 400 !important;
}

View file

@ -73,6 +73,26 @@
<div class="fieldDescription">${LabelDownMixAudioScaleHelp}</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>
<button is="emby-button" type="submit" class="raised submit block"><i class="md-icon">check</i><span>${ButtonSave}</span></button>
</div>

View file

@ -15,6 +15,9 @@
<div class="emby-button-foreground">${TabRecordings}</div>
</button>
<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>
</button>
</div>
@ -82,10 +85,6 @@
<div is="emby-itemscontainer" class="recordingItems itemsContainer"></div>
<br />
</div>
<div id="upcomingRecordings" class="homePageSection hide">
<div class="recordingItems"></div>
<br />
</div>
<div id="recordingGroups" class="hide homePageSection">
<div>
<h1 class="listHeader" style="display: inline-block; vertical-align: middle;">${HeaderAllRecordings}</h1>
@ -94,7 +93,13 @@
<div id="recordingGroupItems"></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>
</div>

View file

@ -11,6 +11,9 @@
$('#txtTranscodingTempPath', page).val(config.TranscodingTempPath || '');
$('#txtVaapiDevice', page).val(config.VaapiDevice || '');
page.querySelector('#selectH264Preset').value = config.H264Preset || '';
page.querySelector('#txtH264Crf').value = config.H264Crf || '';
var selectEncoderPath = page.querySelector('#selectEncoderPath');
selectEncoderPath.value = systemInfo.EncoderLocationType;
@ -71,6 +74,9 @@
config.HardwareAccelerationType = $('#selectVideoDecoder', 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;
ApiClient.updateNamedConfiguration("encoding", config).then(function () {

View file

@ -155,21 +155,10 @@
});
}
function renderUpcomingRecordings(context) {
ApiClient.getLiveTvTimers({
IsActive: false
}).then(function (result) {
renderTimers(context.querySelector('#upcomingRecordings'), result.Items);
});
}
function reload(context) {
Dashboard.showLoadingMsg();
renderUpcomingRecordings(context);
renderActiveRecordings(context);
renderLatestRecordings(context);
@ -191,9 +180,6 @@
tabContent.querySelector('#activeRecordings .recordingItems').addEventListener('timercancelled', function () {
reload(tabContent);
});
tabContent.querySelector('#upcomingRecordings .recordingItems').addEventListener('timercancelled', function () {
reload(tabContent);
});
self.renderTab = function () {
reload(tabContent);

View 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);
};
};
});

View file

@ -101,7 +101,7 @@
var html = cardBuilder.getCardsHtml({
items: items,
shape: shape || (enableScrollX() ? 'autooverflow' : 'auto'),
shape: shape || (enableScrollX() ? 'overflowBackdrop' : 'backdrop'),
showTitle: true,
centerText: true,
coverImage: true,
@ -169,6 +169,10 @@
depends.push('scripts/livetvrecordings');
break;
case 4:
document.body.classList.remove('autoScrollY');
depends.push('scripts/livetvschedule');
break;
case 5:
document.body.classList.remove('autoScrollY');
depends.push('scripts/livetvseriestimers');
break;
@ -200,7 +204,7 @@
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) {
loadTab(view, parseInt(e.detail.selectedTabIndex));

View file

@ -2127,5 +2127,9 @@
"OptionExtractChapterImage": "Enable chapter image extraction",
"Downloads": "Downloads",
"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."
}