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

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