mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
support configurable transcoding temporary path
This commit is contained in:
parent
02cd9ef7f7
commit
bcf0a737d2
@ -19,13 +19,21 @@
|
||||
<fieldset data-role="controlgroup">
|
||||
<legend>Transcoding Quality Preference:</legend>
|
||||
<input type="radio" name="radioEncodingQuality" class="radioEncodingQuality" id="radioAuto" value="Auto">
|
||||
<label for="radioAuto">Auto<br /><span style="font-weight:normal;">The server will decide quality and speed</span></label>
|
||||
<label for="radioAuto">
|
||||
Auto<br />
|
||||
<span style="font-weight: normal;">The server will decide quality and speed</span></label>
|
||||
<input type="radio" name="radioEncodingQuality" class="radioEncodingQuality" id="radioHighSpeed" value="HighSpeed">
|
||||
<label for="radioHighSpeed">Higher speed<br /><span style="font-weight:normal;">Lower quality, but faster encoding</span></label>
|
||||
<label for="radioHighSpeed">
|
||||
Higher speed<br />
|
||||
<span style="font-weight: normal;">Lower quality, but faster encoding</span></label>
|
||||
<input type="radio" name="radioEncodingQuality" class="radioEncodingQuality" id="radioHighQuality" value="HighQuality">
|
||||
<label for="radioHighQuality">Higher quality<br /><span style="font-weight:normal;">Higher quality, but slower encoding</span></label>
|
||||
<label for="radioHighQuality">
|
||||
Higher quality<br />
|
||||
<span style="font-weight: normal;">Higher quality, but slower encoding</span></label>
|
||||
<input type="radio" name="radioEncodingQuality" class="radioEncodingQuality" id="radioMaxQuality" value="MaxQuality">
|
||||
<label for="radioMaxQuality">Max quality<br /><span style="font-weight:normal;">Best quality with slower encoding and high CPU usage</span></label>
|
||||
<label for="radioMaxQuality">
|
||||
Max quality<br />
|
||||
<span style="font-weight: normal;">Best quality with slower encoding and high CPU usage</span></label>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
@ -35,6 +43,27 @@
|
||||
<label for="chkEnableDebugEncodingLogging">Enable debug transcoding logging</label>
|
||||
<div class="fieldDescription">This will create very large log files and is only recommended as needed for troubleshooting purposes.</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>Transcoding Temporary Path</h2>
|
||||
<ul data-role="listview" class="ulForm">
|
||||
<li>
|
||||
<input type="checkbox" id="chkEnableCustomTranscodingTempPath" name="chkEnableCustomTranscodingTempPath" data-mini="true" />
|
||||
<label for="chkEnableCustomTranscodingTempPath">Use custom transcoding temporary path</label>
|
||||
<div class="fieldDescription">
|
||||
This folder contains server cache files, such as images.
|
||||
</div>
|
||||
</li>
|
||||
<li id="fldEnterTranscodingTempPath" style="display: none;">
|
||||
<label for="txtTranscodingTempPath">Server cache path: </label>
|
||||
<div style="display: inline-block; width: 92%;">
|
||||
<input type="text" id="txtTranscodingTempPath" name="txtTranscodingTempPath" data-mini="true" />
|
||||
</div>
|
||||
<button id="btnSelectTranscodingTempPath" type="button" data-icon="search" data-iconpos="notext" data-inline="true">Select Directory</button>
|
||||
<div class="fieldDescription">
|
||||
Supply a custom cache path. Media Browser Server must have write access to this folder. The location of this folder will directly impact server performance and should ideally be placed on a solid state drive.
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<button type="submit" data-theme="b" data-icon="check" data-mini="true">
|
||||
Save
|
||||
@ -43,7 +72,6 @@
|
||||
Cancel
|
||||
</button>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -10,16 +10,64 @@
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('#txtTranscodingTempPath', page).val(config.TranscodingTempPath || '');
|
||||
|
||||
var transcodingTempPath = config.TranscodingTempPath ? true : false;
|
||||
$('#chkEnableCustomTranscodingTempPath', page).checked(transcodingTempPath).checkboxradio("refresh");
|
||||
|
||||
if (transcodingTempPath) {
|
||||
$('#fldEnterTranscodingTempPath', page).show();
|
||||
$('#txtTranscodingTempPath', page).attr("required", "required");
|
||||
} else {
|
||||
$('#fldEnterTranscodingTempPath', page).hide();
|
||||
$('#txtTranscodingTempPath', page).removeAttr("required");
|
||||
}
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
$(document).on('pageshow', "#encodingSettingsPage", function () {
|
||||
$(document).on('pageinit', "#encodingSettingsPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('#btnSelectTranscodingTempPath', page).on("click.selectDirectory", function () {
|
||||
|
||||
var picker = new DirectoryBrowser(page);
|
||||
|
||||
picker.show({
|
||||
|
||||
callback: function (path) {
|
||||
|
||||
if (path) {
|
||||
$('#txtTranscodingTempPath', page).val(path);
|
||||
}
|
||||
picker.close();
|
||||
},
|
||||
|
||||
header: "Select Transcoding Temporary Path",
|
||||
|
||||
instruction: "Browse or enter the path to use for transcoding temporary files. The folder must be writeable."
|
||||
});
|
||||
});
|
||||
|
||||
$('#chkEnableCustomTranscodingTempPath', page).on("change.showTranscodingTempPathText", function () {
|
||||
|
||||
if (this.checked) {
|
||||
$('#fldEnterTranscodingTempPath', page).show();
|
||||
$('#txtTranscodingTempPath', page).attr("required", "required");
|
||||
} else {
|
||||
$('#fldEnterTranscodingTempPath', page).hide();
|
||||
$('#txtTranscodingTempPath', page).removeAttr("required");
|
||||
}
|
||||
|
||||
});
|
||||
}).on('pageshow', "#encodingSettingsPage", function () {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var page = this;
|
||||
|
||||
ApiClient.getServerConfiguration().done(function(config) {
|
||||
ApiClient.getServerConfiguration().done(function (config) {
|
||||
|
||||
loadPage(page, config);
|
||||
|
||||
@ -36,6 +84,12 @@
|
||||
|
||||
ApiClient.getServerConfiguration().done(function (config) {
|
||||
|
||||
if ($('#chkEnableCustomTranscodingTempPath', form).checked()) {
|
||||
config.TranscodingTempPath = $('#txtTranscodingTempPath', form).val();
|
||||
} else {
|
||||
config.TranscodingTempPath = '';
|
||||
}
|
||||
|
||||
config.EnableDebugEncodingLogging = $('#chkEnableDebugEncodingLogging', form).checked();
|
||||
config.MediaEncodingQuality = $('.radioEncodingQuality:checked', form).val();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user