diff --git a/dashboard-ui/bower_components/emby-webcomponents/appsettings.js b/dashboard-ui/bower_components/emby-webcomponents/appsettings.js index ab6d4e07fc..8d331b9e4d 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/appsettings.js +++ b/dashboard-ui/bower_components/emby-webcomponents/appsettings.js @@ -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) { diff --git a/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js b/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js index 7a3b045854..1fb4fae552 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js +++ b/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js @@ -441,7 +441,8 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter', items: [ { Id: itemId - }] + }], + isLocalSync: true }); }); getResolveFunction(resolve, id)(); diff --git a/dashboard-ui/bower_components/emby-webcomponents/multiselect/multiselect.js b/dashboard-ui/bower_components/emby-webcomponents/multiselect/multiselect.js index f25f46a3e4..aa68c6332a 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/multiselect/multiselect.js +++ b/dashboard-ui/bower_components/emby-webcomponents/multiselect/multiselect.js @@ -358,7 +358,8 @@ return { Id: i }; - }) + }), + isLocalSync: true }); }); hideSelections(); diff --git a/dashboard-ui/camerauploadsettings.html b/dashboard-ui/camerauploadsettings.html index cc46870724..be983af99d 100644 --- a/dashboard-ui/camerauploadsettings.html +++ b/dashboard-ui/camerauploadsettings.html @@ -12,13 +12,6 @@
- -
-
- \ No newline at end of file diff --git a/dashboard-ui/components/fileorganizer/fileorganizer.js b/dashboard-ui/components/fileorganizer/fileorganizer.js index ceb87fa9c9..9976a0c53a 100644 --- a/dashboard-ui/components/fileorganizer/fileorganizer.js +++ b/dashboard-ui/components/fileorganizer/fileorganizer.js @@ -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; diff --git a/dashboard-ui/components/fileorganizer/fileorganizer.template.html b/dashboard-ui/components/fileorganizer/fileorganizer.template.html index b9124b70ce..7fdee6235c 100644 --- a/dashboard-ui/components/fileorganizer/fileorganizer.template.html +++ b/dashboard-ui/components/fileorganizer/fileorganizer.template.html @@ -25,14 +25,14 @@ -
- +
+
-
- +
+
-
- +
+
${LabelEndingEpisodeNumberHelp}
diff --git a/dashboard-ui/librarysettings.html b/dashboard-ui/librarysettings.html index 253de3a1ca..98fe8fb65f 100644 --- a/dashboard-ui/librarysettings.html +++ b/dashboard-ui/librarysettings.html @@ -24,7 +24,7 @@
- +
diff --git a/dashboard-ui/mypreferencesmenu.html b/dashboard-ui/mypreferencesmenu.html index ea89e1b18f..c909c06c7b 100644 --- a/dashboard-ui/mypreferencesmenu.html +++ b/dashboard-ui/mypreferencesmenu.html @@ -2,14 +2,13 @@
-

${HeaderSettings}

+

${HeaderSettings}

tv -
-
${ButtonDisplaySettings}
-
${ButtonDisplaySettingsHelp}
+
+
${HeaderDisplay}
@@ -17,9 +16,8 @@
home -
-
${ButtonHomeScreenSettings}
-
${ButtonHomeScreenSettingsHelp}
+
+
${TabHomeScreen}
@@ -27,9 +25,8 @@
play_circle_filled -
-
${ButtonPlaybackSettings}
-
${ButtonPlaybackSettingsHelp}
+
+
${TitlePlayback}
@@ -37,9 +34,8 @@
-
-

+

@@ -84,8 +79,7 @@
-
-

${HeaderAdmin}

+

${HeaderAdmin}

diff --git a/dashboard-ui/mysyncsettings.html b/dashboard-ui/mysyncsettings.html index fe6d060a1a..14bb2eb68c 100644 --- a/dashboard-ui/mysyncsettings.html +++ b/dashboard-ui/mysyncsettings.html @@ -10,7 +10,7 @@
-
+
+
+ +
${LabelMaxAudioFileBitrateHelp}
+
+ - -
-
\ No newline at end of file diff --git a/dashboard-ui/scripts/camerauploadsettings.js b/dashboard-ui/scripts/camerauploadsettings.js index 680656bb05..de9e3974ff 100644 --- a/dashboard-ui/scripts/camerauploadsettings.js +++ b/dashboard-ui/scripts/camerauploadsettings.js @@ -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); + }); }; }); \ No newline at end of file diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js index ac17d13854..36532963c6 100644 --- a/dashboard-ui/scripts/itemdetailpage.js +++ b/dashboard-ui/scripts/itemdetailpage.js @@ -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); diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index 3d81369d99..6567b5aff1 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -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; - } + 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 { diff --git a/dashboard-ui/scripts/mysyncsettings.js b/dashboard-ui/scripts/mysyncsettings.js index a7f98dbb63..3ccbc44d66 100644 --- a/dashboard-ui/scripts/mysyncsettings.js +++ b/dashboard-ui/scripts/mysyncsettings.js @@ -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); + }); }; }); \ No newline at end of file diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 474fd1ce58..94a5fb61ca 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -922,6 +922,7 @@ var Dashboard = { } profile.MaxStreamingBitrate = bitrateSetting; + profile.MaxStaticMusicBitrate = appSettings.maxStaticMusicBitrate(); resolve(profile); }); diff --git a/dashboard-ui/scripts/sync.js b/dashboard-ui/scripts/sync.js index 0e60f8ec30..3cc24ace42 100644 --- a/dashboard-ui/scripts/sync.js +++ b/dashboard-ui/scripts/sync.js @@ -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 += '
'; + html += '
'; html += ''; html += '
'; - html += '
'; } - html += '
'; - html += ''; - html += ''; - html += '