mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 11:28:23 -07:00
commit
66ef2ef664
@ -37,7 +37,16 @@ define(['appStorage', 'events'], function (appStorage, events) {
|
||||
self.set('preferredVideoBitrate', val);
|
||||
}
|
||||
|
||||
return parseInt(self.get('preferredVideoBitrate') || '') || 1500000;
|
||||
return parseInt(self.get('preferredVideoBitrate') || '0') || 1500000;
|
||||
};
|
||||
|
||||
self.maxStaticMusicBitrate = function (val) {
|
||||
|
||||
if (val !== undefined) {
|
||||
self.set('maxStaticMusicBitrate', val);
|
||||
}
|
||||
|
||||
return parseInt(self.get('maxStaticMusicBitrate') || '0') || null;
|
||||
};
|
||||
|
||||
self.maxChromecastBitrate = function (val) {
|
||||
|
@ -441,7 +441,8 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter',
|
||||
items: [
|
||||
{
|
||||
Id: itemId
|
||||
}]
|
||||
}],
|
||||
isLocalSync: true
|
||||
});
|
||||
});
|
||||
getResolveFunction(resolve, id)();
|
||||
|
@ -358,7 +358,8 @@
|
||||
return {
|
||||
Id: i
|
||||
};
|
||||
})
|
||||
}),
|
||||
isLocalSync: true
|
||||
});
|
||||
});
|
||||
hideSelections();
|
||||
|
@ -12,13 +12,6 @@
|
||||
|
||||
<div class="checkboxList uploadServerList">
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<button is="emby-button" type="submit" class="raised submit block">
|
||||
<i class="md-icon">check</i>
|
||||
<span>${ButtonSave}</span>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
@ -1,4 +1,4 @@
|
||||
define(['dialogHelper', 'paper-checkbox', 'paper-input', 'emby-button', 'paper-icon-button-light'], function (dialogHelper) {
|
||||
define(['dialogHelper', 'paper-checkbox', 'emby-input', 'emby-button', 'paper-icon-button-light'], function (dialogHelper) {
|
||||
|
||||
var extractedName;
|
||||
var extractedYear;
|
||||
|
@ -25,14 +25,14 @@
|
||||
<select id="selectSeriesFolder" data-mini="true"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin: 1em 0;">
|
||||
<paper-input id="txtSeason" type="number" pattern="[0-9]*" required min="0" label="${LabelSeasonNumber}"></paper-input>
|
||||
<div class="inputContainer">
|
||||
<input is="emby-input" id="txtSeason" type="number" pattern="[0-9]*" required min="0" label="${LabelSeasonNumber}"/>
|
||||
</div>
|
||||
<div style="margin: 1em 0;">
|
||||
<paper-input id="txtEpisode" type="number" pattern="[0-9]*" required min="0" label="${LabelEpisodeNumber}"></paper-input>
|
||||
<div class="inputContainer">
|
||||
<input is="emby-input" id="txtEpisode" type="number" pattern="[0-9]*" required min="0" label="${LabelEpisodeNumber}"/>
|
||||
</div>
|
||||
<div style="margin: 1em 0;">
|
||||
<paper-input id="txtEndingEpisode" type="number" pattern="[0-9]*" min="0" label="${LabelEndingEpisodeNumber}"></paper-input>
|
||||
<div class="inputContainer">
|
||||
<input is="emby-input" id="txtEndingEpisode" type="number" pattern="[0-9]*" min="0" label="${LabelEndingEpisodeNumber}"/>
|
||||
<div class="fieldDescription">${LabelEndingEpisodeNumberHelp}</div>
|
||||
</div>
|
||||
<div class="fldRemember hide">
|
||||
|
@ -24,7 +24,7 @@
|
||||
<div class="inputContainer">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<div style="flex-grow:1;">
|
||||
<input is="emby-input" id="txtMetadataPath" label="${LabelMetadataPath}" required="required" autocomplete="off" />
|
||||
<input is="emby-input" id="txtMetadataPath" label="${LabelMetadataPath}" autocomplete="off" />
|
||||
</div>
|
||||
<button type="button" is="paper-icon-button-light" id="btnSelectMetadataPath" title="${ButtonSelectDirectory}"><i class="md-icon">search</i></button>
|
||||
</div>
|
||||
|
@ -2,14 +2,13 @@
|
||||
|
||||
<div data-role="content">
|
||||
<div class="readOnlyContent" style="margin: 0 auto;">
|
||||
<h1 class="settingsMenuHeader">${HeaderSettings}</h1>
|
||||
<h1 class="settingsMenuHeader" style="padding-left:.25em;">${HeaderSettings}</h1>
|
||||
<div>
|
||||
<a href="#" class="clearLink lnkDisplayPreferences">
|
||||
<div class="listItem">
|
||||
<i class="md-icon listItemIcon" style="background-color: #03a9f4;">tv</i>
|
||||
<div class="listItemBody two-line">
|
||||
<div>${ButtonDisplaySettings}</div>
|
||||
<div class="secondary">${ButtonDisplaySettingsHelp}</div>
|
||||
<div class="listItemBody">
|
||||
<div>${HeaderDisplay}</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
@ -17,9 +16,8 @@
|
||||
<a href="#" class="clearLink lnkHomeScreenPreferences">
|
||||
<div class="listItem">
|
||||
<i class="md-icon listItemIcon" style="background-color: #e57373;">home</i>
|
||||
<div class="listItemBody two-line">
|
||||
<div>${ButtonHomeScreenSettings}</div>
|
||||
<div class="secondary">${ButtonHomeScreenSettingsHelp}</div>
|
||||
<div class="listItemBody">
|
||||
<div>${TabHomeScreen}</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
@ -27,9 +25,8 @@
|
||||
<a href="#" class="clearLink lnkLanguagePreferences">
|
||||
<div class="listItem">
|
||||
<i class="md-icon listItemIcon" style="background-color: #81c784;">play_circle_filled</i>
|
||||
<div class="listItemBody two-line">
|
||||
<div>${ButtonPlaybackSettings}</div>
|
||||
<div class="secondary">${ButtonPlaybackSettingsHelp}</div>
|
||||
<div class="listItemBody">
|
||||
<div>${TitlePlayback}</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
@ -37,9 +34,8 @@
|
||||
<a href="#" class="clearLink lnkMyProfile">
|
||||
<div class="listItem">
|
||||
<i class="md-icon listItemIcon" style="background-color: #ffd54f;">person</i>
|
||||
<div class="listItemBody two-line">
|
||||
<div class="listItemBody">
|
||||
<div>${ButtonProfile}</div>
|
||||
<div class="secondary">${ButtonProfileHelp}</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
@ -63,8 +59,7 @@
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<br />
|
||||
<h1 class="headerUser"></h1>
|
||||
<h1 class="headerUser" style="padding-left:.25em;"></h1>
|
||||
<div>
|
||||
<a href="selectserver.html" class="clearLink selectServer hide">
|
||||
<div class="listItem">
|
||||
@ -84,8 +79,7 @@
|
||||
</div>
|
||||
|
||||
<div class="adminSection hide">
|
||||
<br />
|
||||
<h1>${HeaderAdmin}</h1>
|
||||
<h1 style="padding-left:.25em;">${HeaderAdmin}</h1>
|
||||
<div>
|
||||
<a href="dashboard.html" class="clearLink">
|
||||
<div class="listItem">
|
||||
|
@ -19,16 +19,22 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="selectContainer">
|
||||
<select is="emby-select" class="selectAudioBitrate" label="${LabelMaxAudioFileBitrate}">
|
||||
<option value="">${OptionNone}</option>
|
||||
<option value="320000">320K</option>
|
||||
<option value="256000">256K</option>
|
||||
<option value="192000">192K</option>
|
||||
<option value="128000">128K</option>
|
||||
<option value="64000">64K</option>
|
||||
</select>
|
||||
<div class="fieldDescription">${LabelMaxAudioFileBitrateHelp}</div>
|
||||
</div>
|
||||
|
||||
<label class="checkboxContainer">
|
||||
<input type="checkbox" is="emby-checkbox" id="chkWifi" />
|
||||
<span>${OptionSyncOnlyOnWifi}</span>
|
||||
</label>
|
||||
|
||||
<br />
|
||||
<button is="emby-button" type="submit" class="raised submit block">
|
||||
<i class="md-icon">check</i>
|
||||
<span>${ButtonSave}</span>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
@ -16,7 +16,7 @@
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
function saveUser(page, user) {
|
||||
function saveUser(page) {
|
||||
|
||||
var chkUploadServer = page.querySelectorAll('.chkUploadServer');
|
||||
var cameraUploadServers = [];
|
||||
@ -47,13 +47,7 @@
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var userId = getParameterByName('userId') || Dashboard.getCurrentUserId();
|
||||
|
||||
ApiClient.getUser(userId).then(function (user) {
|
||||
|
||||
saveUser(view, user);
|
||||
|
||||
});
|
||||
saveUser(view);
|
||||
|
||||
// Disable default form submission
|
||||
e.preventDefault();
|
||||
@ -72,6 +66,11 @@
|
||||
loadForm(page, user);
|
||||
});
|
||||
});
|
||||
|
||||
view.addEventListener('viewbeforehide', function () {
|
||||
|
||||
saveUser(this);
|
||||
});
|
||||
};
|
||||
|
||||
});
|
@ -2057,7 +2057,8 @@
|
||||
if (this.checked) {
|
||||
require(['syncDialog'], function (syncDialog) {
|
||||
syncDialog.showMenu({
|
||||
items: [currentItem]
|
||||
items: [currentItem],
|
||||
isLocalSync: true
|
||||
}).then(function () {
|
||||
reload(view, params);
|
||||
}, resetSyncStatus);
|
||||
|
@ -62,9 +62,7 @@ define(['appSettings', 'userSettings', 'appStorage', 'datetime'], function (appS
|
||||
var currentSrc = (self.getCurrentSrc(mediaRenderer) || '').toLowerCase();
|
||||
|
||||
if (currentSrc.indexOf('.m3u8') != -1) {
|
||||
if (currentSrc.indexOf('forcelivestream=true') == -1) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
var duration = mediaRenderer.duration();
|
||||
return duration && !isNaN(duration) && duration != Number.POSITIVE_INFINITY && duration != Number.NEGATIVE_INFINITY;
|
||||
@ -538,11 +536,6 @@ define(['appSettings', 'userSettings', 'appStorage', 'datetime'], function (appS
|
||||
|
||||
if (mediaSource.TranscodingSubProtocol == 'hls') {
|
||||
|
||||
if (mediaUrl.toLowerCase().indexOf('forcelivestream=true') != -1) {
|
||||
startPositionInSeekParam = 0;
|
||||
startTimeTicksOffset = startPosition || 0;
|
||||
}
|
||||
|
||||
contentType = 'application/x-mpegURL';
|
||||
|
||||
} else {
|
||||
|
@ -1,45 +1,26 @@
|
||||
define(['appSettings', 'apphost'], function (appSettings, appHost) {
|
||||
define(['appSettings', 'apphost', 'emby-checkbox', 'emby-select', 'emby-input'], function (appSettings, appHost) {
|
||||
|
||||
function loadForm(page, user) {
|
||||
|
||||
page.querySelector('#txtSyncPath').value = appSettings.syncPath() || '';
|
||||
page.querySelector('#chkWifi').checked = appSettings.syncOnlyOnWifi();
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
page.querySelector('.selectAudioBitrate').value = appSettings.maxStaticMusicBitrate() || '';
|
||||
}
|
||||
|
||||
function saveUser(page, user) {
|
||||
function saveUser(page) {
|
||||
|
||||
var syncPath = page.querySelector('#txtSyncPath').value;
|
||||
|
||||
appSettings.syncPath(syncPath);
|
||||
appSettings.syncOnlyOnWifi(page.querySelector('#chkWifi').checked);
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
require(['toast'], function (toast) {
|
||||
toast(Globalize.translate('SettingsSaved'));
|
||||
});
|
||||
|
||||
if (syncPath) {
|
||||
if (window.MainActivity) {
|
||||
MainActivity.authorizeStorage();
|
||||
}
|
||||
}
|
||||
appSettings.maxStaticMusicBitrate(page.querySelector('.selectAudioBitrate').value || null);
|
||||
}
|
||||
|
||||
return function (view, params) {
|
||||
|
||||
view.querySelector('form').addEventListener('submit', function (e) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var userId = getParameterByName('userId') || Dashboard.getCurrentUserId();
|
||||
|
||||
ApiClient.getUser(userId).then(function (user) {
|
||||
|
||||
saveUser(view, user);
|
||||
|
||||
});
|
||||
saveUser(view);
|
||||
|
||||
// Disable default form submission
|
||||
e.preventDefault();
|
||||
@ -61,8 +42,6 @@
|
||||
view.addEventListener('viewshow', function () {
|
||||
var page = this;
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var userId = getParameterByName('userId') || Dashboard.getCurrentUserId();
|
||||
|
||||
ApiClient.getUser(userId).then(function (user) {
|
||||
@ -76,6 +55,11 @@
|
||||
page.querySelector('.fldSyncPath').classList.add('hide');
|
||||
}
|
||||
});
|
||||
|
||||
view.addEventListener('viewbeforehide', function () {
|
||||
|
||||
saveUser(this);
|
||||
});
|
||||
};
|
||||
|
||||
});
|
@ -922,6 +922,7 @@ var Dashboard = {
|
||||
}
|
||||
|
||||
profile.MaxStreamingBitrate = bitrateSetting;
|
||||
profile.MaxStaticMusicBitrate = appSettings.maxStaticMusicBitrate();
|
||||
|
||||
resolve(profile);
|
||||
});
|
||||
|
@ -86,7 +86,7 @@
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
require(['emby-checkbox', 'emby-input', 'emby-collapse'], function () {
|
||||
require(['emby-checkbox', 'emby-input', 'emby-select'], function () {
|
||||
|
||||
appHost.appInfo().then(function (appInfo) {
|
||||
renderFormInternal(options, appInfo, resolve);
|
||||
@ -104,22 +104,22 @@
|
||||
|
||||
var html = '';
|
||||
|
||||
var targetContainerClass = options.isLocalSync ? ' hide' : '';
|
||||
|
||||
if (options.showName || dialogOptions.Options.indexOf('Name') != -1) {
|
||||
|
||||
html += '<div class="inputContainer">';
|
||||
html += '<div class="inputContainer' + targetContainerClass + '">';
|
||||
html += '<input is="emby-input" type="text" id="txtSyncJobName" class="txtSyncJobName" required="required" label="' + Globalize.translate('LabelSyncJobName') + '"/>';
|
||||
html += '</div>';
|
||||
html += '<br/>';
|
||||
}
|
||||
|
||||
html += '<div>';
|
||||
if (options.readOnlySyncTarget) {
|
||||
html += '<div class="inputContainer">';
|
||||
html += '<div class="inputContainer' + targetContainerClass + '">';
|
||||
html += '<input is="emby-input" type="text" id="selectSyncTarget" readonly label="' + Globalize.translate('LabelSyncTo') + '"/>';
|
||||
html += '</div>';
|
||||
} else {
|
||||
html += '<label for="selectSyncTarget" class="selectLabel">' + Globalize.translate('LabelSyncTo') + '</label>';
|
||||
html += '<select id="selectSyncTarget" required="required" data-mini="true">';
|
||||
html += '<div class="selectContainer' + targetContainerClass + '">';
|
||||
html += '<select is="emby-select" id="selectSyncTarget" required="required" label="' + Globalize.translate('LabelSyncTo') + '">';
|
||||
|
||||
html += targets.map(function (t) {
|
||||
|
||||
@ -133,34 +133,26 @@
|
||||
html += '<div class="fieldDescription">' + Globalize.translate('LabelSyncNoTargetsHelp') + '</div>';
|
||||
html += '<div class="fieldDescription"><a href="https://github.com/MediaBrowser/Wiki/wiki/Sync" target="_blank">' + Globalize.translate('ButtonLearnMore') + '</a></div>';
|
||||
}
|
||||
}
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
html += '<div class="fldProfile" style="display:none;">';
|
||||
html += '<br/>';
|
||||
html += '<label for="selectProfile" class="selectLabel">' + Globalize.translate('LabelProfile') + '</label>';
|
||||
html += '<select id="selectProfile" data-mini="true">';
|
||||
html += '<div class="fldProfile selectContainer" style="display:none;">';
|
||||
html += '<select is="emby-select" id="selectProfile" label="' + Globalize.translate('LabelProfile') + '">';
|
||||
html += '</select>';
|
||||
html += '<div class="fieldDescription profileDescription"></div>';
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="fldQuality" style="display:none;">';
|
||||
html += '<br/>';
|
||||
html += '<label for="selectQuality" class="selectLabel">' + Globalize.translate('LabelQuality') + '</label>';
|
||||
html += '<select id="selectQuality" data-mini="true" required="required">';
|
||||
html += '<div class="fldQuality selectContainer" style="display:none;">';
|
||||
html += '<select is="emby-select" id="selectQuality" data-mini="true" required="required" label="' + Globalize.translate('LabelQuality') + '">';
|
||||
html += '</select>';
|
||||
html += '<div class="fieldDescription qualityDescription"></div>';
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="fldBitrate" style="display:none;">';
|
||||
html += '<br/>';
|
||||
html += '<div class="inputContainer">';
|
||||
html += '<div class="fldBitrate inputContainer" style="display:none;">';
|
||||
html += '<input is="emby-input" type="number" step=".1" min=".1" id="txtBitrate" label="' + Globalize.translate('LabelBitrateMbps') + '"/>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
|
||||
if (dialogOptions.Options.indexOf('UnwatchedOnly') != -1) {
|
||||
html += '<br/>';
|
||||
html += '<div class="checkboxContainer checkboxContainer-withDescription">';
|
||||
html += '<label>';
|
||||
html += '<input is="emby-checkbox" type="checkbox" id="chkUnwatchedOnly"/>';
|
||||
@ -170,13 +162,7 @@
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
if (dialogOptions.Options.indexOf('SyncNewContent') != -1 ||
|
||||
dialogOptions.Options.indexOf('ItemLimit') != -1) {
|
||||
|
||||
html += '<div is="emby-collapse" title="' + Globalize.translate('HeaderAdvanced') + '">';
|
||||
html += '<div class="collapseContent">';
|
||||
if (dialogOptions.Options.indexOf('SyncNewContent') != -1) {
|
||||
html += '<br/>';
|
||||
html += '<div class="checkboxContainer checkboxContainer-withDescription">';
|
||||
html += '<label>';
|
||||
html += '<input is="emby-checkbox" type="checkbox" id="chkSyncNewContent"/>';
|
||||
@ -192,10 +178,6 @@
|
||||
html += '<div class="fieldDescription">' + Globalize.translate('LabelItemLimitHelp') + '</div>';
|
||||
html += '</div>';
|
||||
}
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '<br/>';
|
||||
}
|
||||
|
||||
//html += '</div>';
|
||||
//html += '</div>';
|
||||
@ -312,7 +294,8 @@
|
||||
renderForm({
|
||||
elem: dlg.querySelector('.formFields'),
|
||||
dialogOptions: dialogOptions,
|
||||
dialogOptionsFn: getTargetDialogOptionsFn(dialogOptionsQuery)
|
||||
dialogOptionsFn: getTargetDialogOptionsFn(dialogOptionsQuery),
|
||||
isLocalSync: options.isLocalSync
|
||||
});
|
||||
|
||||
return promise.then(function () {
|
||||
|
@ -2108,7 +2108,7 @@
|
||||
"LabelSyncJobName": "Sync job name:",
|
||||
"LabelQuality": "Quality:",
|
||||
"OptionAutomaticallySyncNewContent": "Automatically sync new content",
|
||||
"OptionAutomaticallySyncNewContentHelp": "New content added to will be automatically synced to the device.",
|
||||
"OptionAutomaticallySyncNewContentHelp": "New content added to this folder will be automatically synced to the device.",
|
||||
"OptionSyncUnwatchedVideosOnly": "Sync unwatched videos only",
|
||||
"OptionSyncUnwatchedVideosOnlyHelp": "Only unwatched videos will be synced, and videos will be removed from the device as they are watched.",
|
||||
"LabelItemLimit": "Item limit:",
|
||||
@ -2320,5 +2320,7 @@
|
||||
"ManageOfflineDownloads": "Manage offline downloads",
|
||||
"MessageDownloadScheduled": "Download scheduled",
|
||||
"RememberMe": "Remember me",
|
||||
"HeaderOfflineSync": "Offline Sync"
|
||||
"HeaderOfflineSync": "Offline Sync",
|
||||
"LabelMaxAudioFileBitrate": "Max audio file bitrate:",
|
||||
"LabelMaxAudioFileBitrateHelp": "Audio files with a higher bitrate will be converted by Emby Server. Select a higher value for better quality, or a lower value to conserve local storage space."
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user