mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
rework transcoding settings
This commit is contained in:
parent
5439ca56b6
commit
a1890b0e4e
8 changed files with 60 additions and 62 deletions
4
dashboard-ui/cordova/registrationservices.js
vendored
4
dashboard-ui/cordova/registrationservices.js
vendored
|
@ -2,9 +2,7 @@
|
||||||
|
|
||||||
function isAndroid() {
|
function isAndroid() {
|
||||||
|
|
||||||
var platform = (device.platform || '').toLowerCase();
|
return $.browser.android;
|
||||||
|
|
||||||
return platform.indexOf('android') != -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPremiumUnlockFeatureId() {
|
function getPremiumUnlockFeatureId() {
|
||||||
|
|
|
@ -364,10 +364,6 @@
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.libraryDocument .inboxSidebarLink {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboardDocument .lnkMySync {
|
.dashboardDocument .lnkMySync {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
@ -376,6 +372,10 @@
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dashboardDocument .headerVoiceButton {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
.darkDrawer {
|
.darkDrawer {
|
||||||
background-color: #282828 !important;
|
background-color: #282828 !important;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,32 +18,23 @@
|
||||||
|
|
||||||
<form class="encodingSettingsForm">
|
<form class="encodingSettingsForm">
|
||||||
|
|
||||||
<fieldset data-role="controlgroup">
|
|
||||||
<legend>${HeaderTranscodingQualityPreference}</legend>
|
|
||||||
<input type="radio" name="radioEncodingQuality" class="radioEncodingQuality" id="radioAuto" value="Auto">
|
|
||||||
<label for="radioAuto">
|
|
||||||
${OptionAutomatic}<br />
|
|
||||||
<span style="font-weight: normal;">${OptionAutomaticTranscodingHelp}</span>
|
|
||||||
</label>
|
|
||||||
<input type="radio" name="radioEncodingQuality" class="radioEncodingQuality" id="radioHighSpeed" value="HighSpeed">
|
|
||||||
<label for="radioHighSpeed">
|
|
||||||
${OptionHighSpeedTranscoding}<br />
|
|
||||||
<span style="font-weight: normal;">${OptionHighSpeedTranscodingHelp}</span>
|
|
||||||
</label>
|
|
||||||
<input type="radio" name="radioEncodingQuality" class="radioEncodingQuality" id="radioHighQuality" value="HighQuality">
|
|
||||||
<label for="radioHighQuality">
|
|
||||||
${OptionHighQualityTranscoding}<br />
|
|
||||||
<span style="font-weight: normal;">${OptionHighQualityTranscodingHelp}</span>
|
|
||||||
</label>
|
|
||||||
<input type="radio" name="radioEncodingQuality" class="radioEncodingQuality" id="radioMaxQuality" value="MaxQuality">
|
|
||||||
<label for="radioMaxQuality">
|
|
||||||
${OptionMaxQualityTranscoding}<br />
|
|
||||||
<span style="font-weight: normal;">${OptionMaxQualityTranscodingHelp}</span>
|
|
||||||
</label>
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
<ul data-role="listview" class="ulForm">
|
<ul data-role="listview" class="ulForm">
|
||||||
|
<li>
|
||||||
|
<label for="selectThreadCount">${LabelTranscodingThreadCount}</label>
|
||||||
|
<select id="selectThreadCount" data-mini="true">
|
||||||
|
<option value="-1">${OptionAuto}</option>
|
||||||
|
<option value="1">1</option>
|
||||||
|
<option value="2">2</option>
|
||||||
|
<option value="3">3</option>
|
||||||
|
<option value="4">4</option>
|
||||||
|
<option value="5">5</option>
|
||||||
|
<option value="6">6</option>
|
||||||
|
<option value="7">7</option>
|
||||||
|
<option value="8">8</option>
|
||||||
|
<option value="0">${OptionMax}</option>
|
||||||
|
</select>
|
||||||
|
<div class="fieldDescription">${LabelTranscodingThreadCountHelp}</div>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<input type="checkbox" id="chkEnableThrottle" data-mini="true" />
|
<input type="checkbox" id="chkEnableThrottle" data-mini="true" />
|
||||||
<label for="chkEnableThrottle">${OptionEnableTranscodingThrottle}</label>
|
<label for="chkEnableThrottle">${OptionEnableTranscodingThrottle}</label>
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
}).checkboxradio('refresh');
|
}).checkboxradio('refresh');
|
||||||
|
|
||||||
|
$('#selectThreadCount', page).val(config.EncodingThreadCount).selectmenu('refresh');
|
||||||
$('#txtDownMixAudioBoost', page).val(config.DownMixAudioBoost);
|
$('#txtDownMixAudioBoost', page).val(config.DownMixAudioBoost);
|
||||||
$('#txtTranscodingTempPath', page).val(config.TranscodingTempPath || '');
|
$('#txtTranscodingTempPath', page).val(config.TranscodingTempPath || '');
|
||||||
|
|
||||||
|
@ -29,6 +30,7 @@
|
||||||
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();
|
config.EnableThrottling = $('#chkEnableThrottle', form).checked();
|
||||||
|
config.EncodingThreadCount = $('#selectThreadCount', form).val();
|
||||||
|
|
||||||
ApiClient.updateNamedConfiguration("encoding", config).done(Dashboard.processServerConfigurationUpdateResult);
|
ApiClient.updateNamedConfiguration("encoding", config).done(Dashboard.processServerConfigurationUpdateResult);
|
||||||
});
|
});
|
||||||
|
|
|
@ -333,12 +333,8 @@
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
html += '<div class="userMenuOptions">';
|
html += '<div class="userMenuOptions">';
|
||||||
html += '<div class="sidebarDivider"></div>';
|
|
||||||
|
|
||||||
html += '<a class="sidebarLink lnkMediaFolder inboxSidebarLink" data-itemid="inbox" onclick="return LibraryMenu.onLinkClicked(event, this);" href="notificationlist.html"><iron-icon icon="inbox" class="sidebarLinkIcon"></iron-icon>';
|
html += '<div class="sidebarDivider"></div>';
|
||||||
html += Globalize.translate('ButtonInbox');
|
|
||||||
html += '<div class="btnNotifications"><div class="btnNotificationsInner">0</div></div>';
|
|
||||||
html += '</a>';
|
|
||||||
|
|
||||||
if (user.localUser && showUserAtTop()) {
|
if (user.localUser && showUserAtTop()) {
|
||||||
html += '<a class="sidebarLink lnkMediaFolder lnkMySettings" onclick="return LibraryMenu.onLinkClicked(event, this);" data-itemid="mysync" href="mypreferencesmenu.html?userId=' + user.localUser.Id + '"><iron-icon icon="settings" class="sidebarLinkIcon"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonSettings') + '</span></a>';
|
html += '<a class="sidebarLink lnkMediaFolder lnkMySettings" onclick="return LibraryMenu.onLinkClicked(event, this);" data-itemid="mysync" href="mypreferencesmenu.html?userId=' + user.localUser.Id + '"><iron-icon icon="settings" class="sidebarLinkIcon"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonSettings') + '</span></a>';
|
||||||
|
|
|
@ -972,8 +972,7 @@
|
||||||
self.playVideoInternal = function (item, mediaSource, startPosition, streamInfo, callback) {
|
self.playVideoInternal = function (item, mediaSource, startPosition, streamInfo, callback) {
|
||||||
|
|
||||||
var videoUrl = streamInfo.url;
|
var videoUrl = streamInfo.url;
|
||||||
var contentType = streamInfo.mimeType;
|
|
||||||
var startPositionInSeekParam = streamInfo.startPositionInSeekParam;
|
|
||||||
self.startTimeTicksOffset = streamInfo.startTimeTicksOffset;
|
self.startTimeTicksOffset = streamInfo.startTimeTicksOffset;
|
||||||
|
|
||||||
var mediaStreams = mediaSource.MediaStreams || [];
|
var mediaStreams = mediaSource.MediaStreams || [];
|
||||||
|
@ -1137,25 +1136,7 @@
|
||||||
|
|
||||||
mediaRenderer.init().done(function () {
|
mediaRenderer.init().done(function () {
|
||||||
|
|
||||||
var textStreams = subtitleStreams.filter(function (s) {
|
self.setSrcIntoRenderer(mediaRenderer, videoUrl, item, self.currentMediaSource);
|
||||||
return s.DeliveryMethod == 'External';
|
|
||||||
});
|
|
||||||
|
|
||||||
var tracks = [];
|
|
||||||
|
|
||||||
for (var i = 0, length = textStreams.length; i < length; i++) {
|
|
||||||
|
|
||||||
var textStream = textStreams[i];
|
|
||||||
var textStreamUrl = !textStream.IsExternalUrl ? ApiClient.getUrl(textStream.DeliveryUrl) : textStream.DeliveryUrl;
|
|
||||||
|
|
||||||
tracks.push({
|
|
||||||
url: textStreamUrl,
|
|
||||||
language: (textStream.Language || 'und'),
|
|
||||||
isDefault: textStream.Index == mediaSource.DefaultSubtitleStreamIndex
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
mediaRenderer.setCurrentSrc(videoUrl, item, mediaSource, tracks);
|
|
||||||
|
|
||||||
if (callback) {
|
if (callback) {
|
||||||
callback();
|
callback();
|
||||||
|
|
|
@ -640,7 +640,7 @@
|
||||||
ApiClient.stopActiveEncodings(playSessionId).done(function () {
|
ApiClient.stopActiveEncodings(playSessionId).done(function () {
|
||||||
|
|
||||||
//self.startTimeTicksOffset = newPositionTicks;
|
//self.startTimeTicksOffset = newPositionTicks;
|
||||||
mediaRenderer.setCurrentSrc(url, self.currentItem, self.currentMediaSource);
|
self.setSrcIntoRenderer(mediaRenderer, url, self.currentItem, self.currentMediaSource);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -648,10 +648,37 @@
|
||||||
self.updateTextStreamUrls(newPositionTicks || 0);
|
self.updateTextStreamUrls(newPositionTicks || 0);
|
||||||
} else {
|
} else {
|
||||||
self.startTimeTicksOffset = newPositionTicks || 0;
|
self.startTimeTicksOffset = newPositionTicks || 0;
|
||||||
mediaRenderer.setCurrentSrc(url, self.currentItem, self.currentMediaSource);
|
self.setSrcIntoRenderer(mediaRenderer, url, self.currentItem, self.currentMediaSource);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.setSrcIntoRenderer = function (mediaRenderer, url, item, mediaSource) {
|
||||||
|
|
||||||
|
var subtitleStreams = mediaSource.MediaStreams.filter(function (s) {
|
||||||
|
return s.Type == 'Subtitle';
|
||||||
|
});
|
||||||
|
|
||||||
|
var textStreams = subtitleStreams.filter(function (s) {
|
||||||
|
return s.DeliveryMethod == 'External';
|
||||||
|
});
|
||||||
|
|
||||||
|
var tracks = [];
|
||||||
|
|
||||||
|
for (var i = 0, length = textStreams.length; i < length; i++) {
|
||||||
|
|
||||||
|
var textStream = textStreams[i];
|
||||||
|
var textStreamUrl = !textStream.IsExternalUrl ? ApiClient.getUrl(textStream.DeliveryUrl) : textStream.DeliveryUrl;
|
||||||
|
|
||||||
|
tracks.push({
|
||||||
|
url: textStreamUrl,
|
||||||
|
language: (textStream.Language || 'und'),
|
||||||
|
isDefault: textStream.Index == mediaSource.DefaultSubtitleStreamIndex
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
mediaRenderer.setCurrentSrc(url, item, mediaSource, tracks);
|
||||||
|
};
|
||||||
|
|
||||||
self.setCurrentTime = function (ticks, positionSlider, currentTimeElement) {
|
self.setCurrentTime = function (ticks, positionSlider, currentTimeElement) {
|
||||||
|
|
||||||
// Convert to ticks
|
// Convert to ticks
|
||||||
|
|
|
@ -1512,6 +1512,9 @@
|
||||||
"HeaderHomeScreenSettings": "Home Screen settings",
|
"HeaderHomeScreenSettings": "Home Screen settings",
|
||||||
"HeaderProfile": "Profile",
|
"HeaderProfile": "Profile",
|
||||||
"HeaderLanguage": "Language",
|
"HeaderLanguage": "Language",
|
||||||
"ButtonSyncSettings": "Sync settings",
|
"ButtonSyncSettings": "Sync settings",
|
||||||
"ButtonSyncSettingsHelp": "Configure your sync settings"
|
"ButtonSyncSettingsHelp": "Configure your sync settings",
|
||||||
|
"LabelTranscodingThreadCount": "Transcoding thread count:",
|
||||||
|
"LabelTranscodingThreadCountHelp": "Select the maximum number of threads to use when transcoding. Reducing the thread count will lower cpu usage but may not convert fast enough for a smooth playback experience.",
|
||||||
|
"OptionMax": "Max"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue