1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

add setting to control transcodng throttle

This commit is contained in:
Luke Pulverenti 2015-03-30 12:16:34 -04:00
parent 74d6e3aaad
commit 4ffd893f3e
14 changed files with 202 additions and 117 deletions

View file

@ -15,9 +15,14 @@
</div> </div>
<div data-role="controlgroup" data-type="horizontal" class="localnav syncTabs" data-mini="true" style="display:none;"> <div data-role="controlgroup" data-type="horizontal" class="localnav syncTabs" data-mini="true" style="display:none;">
<a href="syncactivity.html" data-role="button">${TabActivity}</a> <a href="syncactivity.html" data-role="button">${TabActivity}</a>
<a href="syncservices.html" data-role="button" class="ui-btn-active">${TabServices}</a> <a href="appservices.html?context=sync" data-role="button" class="ui-btn-active">${TabServices}</a>
<a href="syncsettings.html" data-role="button">${TabSettings}</a> <a href="syncsettings.html" data-role="button">${TabSettings}</a>
</div> </div>
<div data-role="controlgroup" data-type="horizontal" class="localnav livetvTabs" data-mini="true" style="display:none;">
<a href="livetvstatus.html" data-role="button">${TabStatus}</a>
<a href="#" data-role="button" class="ui-btn-active">${TabServices}</a>
<a href="livetvsettings.html" data-role="button">${TabSettings}</a>
</div>
<div class="readOnlyContent"> <div class="readOnlyContent">

View file

@ -0,0 +1,52 @@
<!DOCTYPE html>
<html>
<head>
<title>Emby</title>
</head>
<body>
<div id="appServicesPage" data-role="page" class="page type-interior appServicesPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Sync">
<div data-role="content">
<div class="content-primary">
<div class="sectionTabs syncSectionTabs" style="display:none;">
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
<a href="syncactivity.html" data-role="button">${TabActivity}</a>
<a href="#" data-role="button" class="ui-btn-active">${TabServices}</a>
<a href="syncsettings.html" data-role="button">${TabSettings}</a>
</div>
</div>
<div class="sectionTabs livetvSectionTabs" style="display:none;">
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
<a href="livetvstatus.html" data-role="button">${TabStatus}</a>
<a href="#" data-role="button" class="ui-btn-active">${TabServices}</a>
<a href="livetvsettings.html" data-role="button">${TabSettings}</a>
</div>
</div>
<div class="detailSectionHeader">${HeaderInstalledServices}</div>
<div class="installedPlugins"></div>
<br />
<br />
<br />
<div class="detailSectionHeader">${HeaderAvailableServices}</div>
<div class="catalog"></div>
<div class="supporterPromotion syncPromotion" style="display:none;">
<a class="btn btnActionAccent" href="supporter.html" style="font-size:14px;">
<div>
${HeaderSyncRequiresSupporterMembership}
</div>
<div>
${HeaderEnjoyDayTrial}
</div>
<div style="font-weight:normal;font-size:90%;margin-top:5px;">
${ButtonLearnMore}
</div>
</a>
</div>
</div>
</div>
</div>
</body>
</html>

View file

@ -43,6 +43,11 @@
<br /> <br />
<ul data-role="listview" class="ulForm"> <ul data-role="listview" class="ulForm">
<li>
<input type="checkbox" id="chkEnableThrottle" data-mini="true" />
<label for="chkEnableThrottle">${OptionEnableTranscodingThrottle}</label>
<div class="fieldDescription">${OptionEnableTranscodingThrottleHelp}</div>
</li>
<li> <li>
<label for="txtTranscodingTempPath">${LabelTranscodingTempPath}</label> <label for="txtTranscodingTempPath">${LabelTranscodingTempPath}</label>
<div style="display: inline-block; width: 92%;"> <div style="display: inline-block; width: 92%;">

View file

@ -11,6 +11,7 @@
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true"> <div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
<a href="livetvstatus.html" data-role="button">${TabStatus}</a> <a href="livetvstatus.html" data-role="button">${TabStatus}</a>
<a href="appservices.html?context=livetv" data-role="button">${TabServices}</a>
<a href="#" data-role="button" class="ui-btn-active">${TabSettings}</a> <a href="#" data-role="button" class="ui-btn-active">${TabSettings}</a>
</div> </div>

View file

@ -11,6 +11,7 @@
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true"> <div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
<a href="#" data-role="button" class="ui-btn-active">${TabStatus}</a> <a href="#" data-role="button" class="ui-btn-active">${TabStatus}</a>
<a href="appservices.html?context=livetv" data-role="button">${TabServices}</a>
<a href="livetvsettings.html" data-role="button">${TabSettings}</a> <a href="livetvsettings.html" data-role="button">${TabSettings}</a>
</div> </div>

View file

@ -265,8 +265,11 @@
}); });
}).on('pagebeforeshow pageinit', "#addPluginPage", function () { }).on('pagebeforeshow pageinit', "#addPluginPage", function () {
// This needs both events for the helpurl to get done at the right time
var page = this; var page = this;
var context = getParameterByName('context'); var context = getParameterByName('context');
@ -274,12 +277,24 @@
if (context == 'sync') { if (context == 'sync') {
$('.syncTabs', page).show(); $('.syncTabs', page).show();
$('.pluginTabs', page).hide(); $('.pluginTabs', page).hide();
$('.livetvTabs', page).hide();
page.setAttribute('data-helpurl', 'https://github.com/MediaBrowser/Wiki/wiki/Sync'); page.setAttribute('data-helpurl', 'https://github.com/MediaBrowser/Wiki/wiki/Sync');
Dashboard.setPageTitle(Globalize.translate('TitleSync')); Dashboard.setPageTitle(Globalize.translate('TitleSync'));
} else { }
else if (context == 'livetv') {
$('.syncTabs', page).hide();
$('.pluginTabs', page).hide();
$('.livetvTabs', page).show();
Dashboard.setPageTitle(Globalize.translate('TitleLiveTV'));
page.setAttribute('data-helpurl', 'https://github.com/MediaBrowser/Wiki/wiki/Live%20TV');
}
else {
$('.syncTabs', page).hide(); $('.syncTabs', page).hide();
$('.pluginTabs', page).show(); $('.pluginTabs', page).show();
$('.livetvTabs', page).hide();
page.setAttribute('data-helpurl', 'https://github.com/MediaBrowser/Wiki/wiki/Plugins'); page.setAttribute('data-helpurl', 'https://github.com/MediaBrowser/Wiki/wiki/Plugins');
Dashboard.setPageTitle(Globalize.translate('TitlePlugins')); Dashboard.setPageTitle(Globalize.translate('TitlePlugins'));

View file

@ -0,0 +1,110 @@
(function ($, document) {
function reloadList(page) {
Dashboard.showLoadingMsg();
var promise1 = ApiClient.getAvailablePlugins({
TargetSystems: 'Server'
});
var promise2 = ApiClient.getInstalledPlugins();
$.when(promise1, promise2).done(function (response1, response2) {
renderInstalled(page, response1[0], response2[0]);
renderCatalog(page, response1[0], response2[0]);
});
}
function getCategories() {
var context = getParameterByName('context');
var categories = [];
if (context == 'sync') {
categories.push('Sync');
}
else if (context == 'livetv') {
categories.push('Live TV');
}
return categories;
}
function renderInstalled(page, availablePlugins, installedPlugins) {
var category = getCategories()[0];
installedPlugins = installedPlugins.filter(function (i) {
var catalogEntry = availablePlugins.filter(function (a) {
return a.guid == i.Id;
})[0];
return catalogEntry && catalogEntry.category == category;
});
PluginsPage.renderPlugins(page, installedPlugins);
}
function renderCatalog(page, availablePlugins, installedPlugins) {
var categories = getCategories();
PluginCatalog.renderCatalog({
catalogElement: $('.catalog', page),
availablePlugins: availablePlugins,
installedPlugins: installedPlugins,
categories: categories,
showCategory: false,
context: getParameterByName('context'),
targetSystem: 'Server'
});
}
$(document).on('pagebeforeshow pageinit', "#appServicesPage", function () {
// This needs both events for the helpurl to get done at the right time
var page = this;
var context = getParameterByName('context');
$('.sectionTabs', page).hide();
$('.' + context + 'SectionTabs', page).show();
if (context == 'sync') {
Dashboard.setPageTitle(Globalize.translate('TitleSync'));
page.setAttribute('data-helpurl', 'https://github.com/MediaBrowser/Wiki/wiki/Sync');
}
else if (context == 'livetv') {
Dashboard.setPageTitle(Globalize.translate('TitleLiveTV'));
page.setAttribute('data-helpurl', 'https://github.com/MediaBrowser/Wiki/wiki/Live%20TV');
}
}).on('pageshow', "#appServicesPage", function () {
// This needs both events for the helpurl to get done at the right time
var page = this;
reloadList(page);
var context = getParameterByName('context');
Dashboard.getPluginSecurityInfo().done(function (pluginSecurityInfo) {
if (pluginSecurityInfo.IsMBSupporter || context != 'sync') {
$('.syncPromotion', page).hide();
} else {
$('.syncPromotion', page).show();
}
});
});
})(jQuery, document);

View file

@ -3,7 +3,8 @@
function loadPage(page, config) { function loadPage(page, config) {
$('#chkEnableDebugEncodingLogging', page).checked(config.EnableDebugLogging).checkboxradio('refresh'); $('#chkEnableDebugEncodingLogging', page).checked(config.EnableDebugLogging).checkboxradio('refresh');
$('#chkEnableThrottle', page).checked(config.EnableThrottling).checkboxradio('refresh');
$('.radioEncodingQuality', page).each(function() { $('.radioEncodingQuality', page).each(function() {
this.checked = config.EncodingQuality == this.value; this.checked = config.EncodingQuality == this.value;
@ -67,6 +68,7 @@
config.EncodingQuality = $('.radioEncodingQuality:checked', form).val(); config.EncodingQuality = $('.radioEncodingQuality:checked', form).val();
config.DownMixAudioBoost = $('#txtDownMixAudioBoost', form).val(); config.DownMixAudioBoost = $('#txtDownMixAudioBoost', form).val();
config.TranscodingTempPath = $('#txtTranscodingTempPath', form).val(); config.TranscodingTempPath = $('#txtTranscodingTempPath', form).val();
config.EnableThrottling = $('#chkEnableThrottle', form).checked();
ApiClient.updateNamedConfiguration("encoding", config).done(Dashboard.processServerConfigurationUpdateResult); ApiClient.updateNamedConfiguration("encoding", config).done(Dashboard.processServerConfigurationUpdateResult);
}); });

View file

@ -756,6 +756,9 @@ var Dashboard = {
var pageElem = page[0]; var pageElem = page[0];
var isServicesPage = page.hasClass('appServicesPage');
var context = getParameterByName('context');
return [{ return [{
name: Globalize.translate('TabServer'), name: Globalize.translate('TabServer'),
href: "dashboard.html", href: "dashboard.html",
@ -793,7 +796,7 @@ var Dashboard = {
}, { }, {
name: Globalize.translate('TabSync'), name: Globalize.translate('TabSync'),
href: "syncactivity.html", href: "syncactivity.html",
selected: page.hasClass('syncConfigurationPage'), selected: page.hasClass('syncConfigurationPage') || (isServicesPage && context == 'sync'),
icon: 'fa-cloud' icon: 'fa-cloud'
}, { }, {
divider: true, divider: true,
@ -813,7 +816,7 @@ var Dashboard = {
}, { }, {
name: Globalize.translate('TabLiveTV'), name: Globalize.translate('TabLiveTV'),
href: "livetvstatus.html", href: "livetvstatus.html",
selected: page.hasClass("liveTvSettingsPage"), selected: page.hasClass("liveTvSettingsPage") || (isServicesPage && context == 'livetv'),
icon: 'fa-video-camera', icon: 'fa-video-camera',
color: '#293AAE' color: '#293AAE'
}, { }, {

View file

@ -1,66 +0,0 @@
(function ($, document) {
function reloadList(page) {
Dashboard.showLoadingMsg();
var promise1 = ApiClient.getAvailablePlugins({
TargetSystems: 'Server'
});
var promise2 = ApiClient.getInstalledPlugins();
$.when(promise1, promise2).done(function (response1, response2) {
renderInstalled(page, response1[0], response2[0]);
renderCatalog(page, response1[0], response2[0]);
});
}
function renderInstalled(page, availablePlugins, installedPlugins) {
installedPlugins = installedPlugins.filter(function (i) {
var catalogEntry = availablePlugins.filter(function (a) {
return a.guid == i.Id;
})[0];
return catalogEntry && catalogEntry.category == 'Sync';
});
PluginsPage.renderPlugins(page, installedPlugins);
}
function renderCatalog(page, availablePlugins, installedPlugins) {
PluginCatalog.renderCatalog({
catalogElement: $('.catalog', page),
availablePlugins: availablePlugins,
installedPlugins: installedPlugins,
categories: ['Sync'],
showCategory: false,
context: 'sync',
targetSystem: 'Server'
});
}
$(document).on('pageshow', "#syncServicesPage", function () {
var page = this;
reloadList(page);
Dashboard.getPluginSecurityInfo().done(function (pluginSecurityInfo) {
if (pluginSecurityInfo.IsMBSupporter) {
$('.syncPromotion', page).hide();
} else {
$('.syncPromotion', page).show();
}
});
});
})(jQuery, document);

View file

@ -11,7 +11,7 @@
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true"> <div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
<a href="#" data-role="button" class="ui-btn-active">${TabActivity}</a> <a href="#" data-role="button" class="ui-btn-active">${TabActivity}</a>
<a href="syncservices.html" data-role="button">${TabServices}</a> <a href="appservices.html?context=sync" data-role="button">${TabServices}</a>
<a href="syncsettings.html" data-role="button">${TabSettings}</a> <a href="syncsettings.html" data-role="button">${TabSettings}</a>
</div> </div>

View file

@ -11,7 +11,7 @@
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true"> <div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
<a href="syncactivity.html" data-role="button" class="ui-btn-active">${TabActivity}</a> <a href="syncactivity.html" data-role="button" class="ui-btn-active">${TabActivity}</a>
<a href="syncservices.html" data-role="button">${TabServices}</a> <a href="appservices.html?context=sync" data-role="button">${TabServices}</a>
<a href="syncsettings.html" data-role="button">${TabSettings}</a> <a href="syncsettings.html" data-role="button">${TabSettings}</a>
</div> </div>

View file

@ -1,43 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>${TitleSync}</title>
</head>
<body>
<div id="syncServicesPage" data-role="page" class="page type-interior syncConfigurationPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Sync">
<div data-role="content">
<div class="content-primary">
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
<a href="syncactivity.html" data-role="button">${TabActivity}</a>
<a href="#" data-role="button" class="ui-btn-active">${TabServices}</a>
<a href="syncsettings.html" data-role="button">${TabSettings}</a>
</div>
<div class="detailSectionHeader">${HeaderInstalledServices}</div>
<div class="installedPlugins"></div>
<br />
<br />
<br />
<div class="detailSectionHeader">${HeaderAvailableServices}</div>
<div class="catalog"></div>
<div class="supporterPromotion syncPromotion" style="display:none;">
<a class="btn btnActionAccent" href="supporter.html" style="font-size:14px;">
<div>
${HeaderSyncRequiresSupporterMembership}
</div>
<div>
${HeaderEnjoyDayTrial}
</div>
<div style="font-weight:normal;font-size:90%;margin-top:5px;">
${ButtonLearnMore}
</div>
</a>
</div>
</div>
</div>
</div>
</body>
</html>

View file

@ -11,7 +11,7 @@
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true"> <div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
<a href="syncactivity.html" data-role="button">${TabActivity}</a> <a href="syncactivity.html" data-role="button">${TabActivity}</a>
<a href="syncservices.html" data-role="button">${TabServices}</a> <a href="appservices.html?context=sync" data-role="button">${TabServices}</a>
<a href="#" data-role="button" class="ui-btn-active">${TabSettings}</a> <a href="#" data-role="button" class="ui-btn-active">${TabSettings}</a>
</div> </div>