diff --git a/dashboard-ui/apiclient/apiclient.js b/dashboard-ui/apiclient/apiclient.js index 6c5e0f96be..5500913ecb 100644 --- a/dashboard-ui/apiclient/apiclient.js +++ b/dashboard-ui/apiclient/apiclient.js @@ -251,7 +251,7 @@ logger.log("Reconnect attempt failed to " + url); - if (currentRetryCount <= 5) { + if (currentRetryCount < 5) { var newConnectionMode = switchConnectionMode(connectionMode); diff --git a/dashboard-ui/apiclient/connectionmanager.js b/dashboard-ui/apiclient/connectionmanager.js index 8fefd279e7..7b7b60dc6c 100644 --- a/dashboard-ui/apiclient/connectionmanager.js +++ b/dashboard-ui/apiclient/connectionmanager.js @@ -322,7 +322,7 @@ function saveUserInfoIntoCredentials(server, user) { - var info = new { + var info = { Id: user.Id, IsSignedInOffline: true } diff --git a/dashboard-ui/cordova/android/localassetmanager.js b/dashboard-ui/cordova/android/localassetmanager.js index 043f660837..01820a5a2d 100644 --- a/dashboard-ui/cordova/android/localassetmanager.js +++ b/dashboard-ui/cordova/android/localassetmanager.js @@ -10,6 +10,12 @@ return null; } + function saveOfflineUser(user) { + var deferred = DeferredBuilder.Deferred(); + deferred.resolve(); + return deferred.promise(); + } + function getCameraPhotos() { var deferred = DeferredBuilder.Deferred(); deferred.resolveWith(null, [[]]); diff --git a/dashboard-ui/cordova/android/vlcplayer.js b/dashboard-ui/cordova/android/vlcplayer.js index a40498b92b..1864f26c12 100644 --- a/dashboard-ui/cordova/android/vlcplayer.js +++ b/dashboard-ui/cordova/android/vlcplayer.js @@ -92,39 +92,39 @@ function getPlaybackStartInfoForVideoActivity(videoUrl, mediaSource, item) { - var state = { - PlayState: {} + var playbackStartInfo = { + QueueableMediaTypes: item.MediaType, + ItemId: item.Id, + NowPlayingItem: {}, + MediaSourceId: mediaSource.Id }; + if (mediaSource.RunTimeTicks) { + playbackStartInfo.NowPlayingItem.RunTimeTicks = mediaSource.RunTimeTicks; + } + var audioStreamIndex = getParameterByName('AudioStreamIndex', videoUrl); if (audioStreamIndex) { - state.PlayState.AudioStreamIndex = parseInt(audioStreamIndex); + playbackStartInfo.AudioStreamIndex = parseInt(audioStreamIndex); + } + if (self.currentSubtitleStreamIndex != null) { + playbackStartInfo.SubtitleStreamIndex = self.currentSubtitleStreamIndex; } - state.PlayState.SubtitleStreamIndex = self.currentSubtitleStreamIndex; - state.PlayState.PlayMethod = getParameterByName('static', videoUrl) == 'true' ? + playbackStartInfo.PlayMethod = getParameterByName('static', videoUrl) == 'true' ? 'DirectStream' : 'Transcode'; - state.PlayState.LiveStreamId = getParameterByName('LiveStreamId', videoUrl); - state.PlayState.PlaySessionId = getParameterByName('PlaySessionId', videoUrl); + playbackStartInfo.LiveStreamId = getParameterByName('LiveStreamId', videoUrl); + playbackStartInfo.PlaySessionId = getParameterByName('PlaySessionId', videoUrl); - state.PlayState.MediaSourceId = mediaSource.Id; + // Seeing some deserialization errors around this property + if (mediaSource.RunTimeTicks && mediaSource.RunTimeTicks > 0) { + playbackStartInfo.CanSeek = true; + } - state.NowPlayingItem = { - RunTimeTicks: mediaSource.RunTimeTicks - }; - - state.PlayState.CanSeek = mediaSource.RunTimeTicks && mediaSource.RunTimeTicks > 0; - - var playbackStartInfo = { - QueueableMediaTypes: item.MediaType, - ItemId: item.Id, - NowPlayingItem: state.NowPlayingItem - }; - - return $.extend(playbackStartInfo, state.PlayState); + return playbackStartInfo; } self.setCurrentSrc = function (val, item, mediaSource, tracks) { diff --git a/dashboard-ui/css/mediaplayer-video.css b/dashboard-ui/css/mediaplayer-video.css index 57bdaef4fb..8207fab80c 100644 --- a/dashboard-ui/css/mediaplayer-video.css +++ b/dashboard-ui/css/mediaplayer-video.css @@ -211,10 +211,6 @@ max-height: 100%; } - /* Hack for safari because it doesn't allow clickable content over the video surface. */ - /*.itemVideo { (;top: 9%!important;height: 91% !important;); } -.itemVideo { [;top: 9%!important;height: 91% !important;]; }*/ - #videoPlayer .inactive { display: none !important; } diff --git a/dashboard-ui/mysyncsettings.html b/dashboard-ui/mysyncsettings.html index c75c03dc5b..f8468573ed 100644 --- a/dashboard-ui/mysyncsettings.html +++ b/dashboard-ui/mysyncsettings.html @@ -15,7 +15,7 @@
-
+
diff --git a/dashboard-ui/scripts/episodes.js b/dashboard-ui/scripts/episodes.js index b6a9bef520..9592978ede 100644 --- a/dashboard-ui/scripts/episodes.js +++ b/dashboard-ui/scripts/episodes.js @@ -109,13 +109,13 @@ this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); - }).checkboxradio('refresh'); + }); $('.radioSortOrder', page).each(function () { this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); - }).checkboxradio('refresh'); + }); $('.chkStandardFilter', page).each(function () { @@ -124,7 +124,7 @@ this.checked = filters.toLowerCase().indexOf(',' + filterName.toLowerCase()) != -1; - }).checkboxradio('refresh'); + }); $('.chkVideoTypeFilter', page).each(function () { @@ -133,21 +133,21 @@ this.checked = filters.indexOf(',' + filterName) != -1; - }).checkboxradio('refresh'); + }); $('#selectView', page).val(view); - $('#chkHD', page).checked(query.IsHD == true).checkboxradio('refresh'); - $('#chkSD', page).checked(query.IsHD == false).checkboxradio('refresh'); + $('#chkHD', page).checked(query.IsHD == true); + $('#chkSD', page).checked(query.IsHD == false); - $('#chkSubtitle', page).checked(query.HasSubtitles == true).checkboxradio('refresh'); - $('#chkTrailer', page).checked(query.HasTrailer == true).checkboxradio('refresh'); - $('#chkThemeSong', page).checked(query.HasThemeSong == true).checkboxradio('refresh'); - $('#chkThemeVideo', page).checked(query.HasThemeVideo == true).checkboxradio('refresh'); - $('#chkSpecialFeature', page).checked(query.ParentIndexNumber == 0).checkboxradio('refresh'); + $('#chkSubtitle', page).checked(query.HasSubtitles == true); + $('#chkTrailer', page).checked(query.HasTrailer == true); + $('#chkThemeSong', page).checked(query.HasThemeSong == true); + $('#chkThemeVideo', page).checked(query.HasThemeVideo == true); + $('#chkSpecialFeature', page).checked(query.ParentIndexNumber == 0); - $('#chkMissingEpisode', page).checked(query.IsMissing == true).checkboxradio('refresh'); - $('#chkFutureEpisode', page).checked(query.IsUnaired == true).checkboxradio('refresh'); + $('#chkMissingEpisode', page).checked(query.IsMissing == true); + $('#chkFutureEpisode', page).checked(query.IsUnaired == true); $('.alphabetPicker', page).alphaValue(query.NameStartsWithOrGreater); $('#selectPageSize', page).val(query.Limit); diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index 4f3eba1917..18c438ad00 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -130,7 +130,7 @@ var profile = {}; profile.MaxStreamingBitrate = bitrateSetting; - profile.MaxStaticBitrate = 4000000; + profile.MaxStaticBitrate = 8000000; profile.MusicStreamingTranscodingBitrate = Math.min(bitrateSetting, 192000); profile.DirectPlayProfiles = []; diff --git a/dashboard-ui/scripts/mypreferencescommon.js b/dashboard-ui/scripts/mypreferencescommon.js index c5a8ee4bd8..1b341637d3 100644 --- a/dashboard-ui/scripts/mypreferencescommon.js +++ b/dashboard-ui/scripts/mypreferencescommon.js @@ -10,7 +10,7 @@ $('.lnkMyProfile', page).attr('href', 'myprofile.html?userId=' + userId); $('.lnkSync', page).attr('href', 'mysyncsettings.html?userId=' + userId); - if (AppInfo.supportsSyncPathSetting) { + if (Dashboard.capabilities().SupportsSync) { page.querySelector('.lnkSync').classList.remove('hide'); } else { page.querySelector('.lnkSync').classList.add('hide'); diff --git a/dashboard-ui/scripts/mysyncsettings.js b/dashboard-ui/scripts/mysyncsettings.js index 16f45f4982..4dd038bfee 100644 --- a/dashboard-ui/scripts/mysyncsettings.js +++ b/dashboard-ui/scripts/mysyncsettings.js @@ -64,6 +64,12 @@ loadForm(page, user); }); + + if (AppInfo.supportsSyncPathSetting) { + page.querySelector('.fldSyncPath').classList.remove('hide'); + } else { + page.querySelector('.fldSyncPath').classList.add('hide'); + } }); })(jQuery, window, document); \ No newline at end of file diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index e496e728a2..add7afe285 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -122,7 +122,9 @@ var Dashboard = { if (!Dashboard.getUserPromise) { - Dashboard.getUserPromise = window.ApiClient.getCurrentUser().fail(Dashboard.logout); + Dashboard.getUserPromise = window.ApiClient.getCurrentUser().fail(function () { + Dashboard.getUserPromise = null; + }); } return Dashboard.getUserPromise; diff --git a/dashboard-ui/themes/ios.css b/dashboard-ui/themes/ios.css index 98caff29ea..02f404d96f 100644 --- a/dashboard-ui/themes/ios.css +++ b/dashboard-ui/themes/ios.css @@ -2,6 +2,11 @@ font-family: San Francisco, Helvetica Neue; } +.backdropContainer { + /* This isn't implemented right and ends up looking terrible */ + background-attachment: initial; +} + .background-theme-b { background-color: #1c1c1c; } diff --git a/dashboard-ui/thirdparty/paper-button-style.css b/dashboard-ui/thirdparty/paper-button-style.css index 87bac1059c..658d8430c2 100644 --- a/dashboard-ui/thirdparty/paper-button-style.css +++ b/dashboard-ui/thirdparty/paper-button-style.css @@ -98,11 +98,11 @@ paper-button[raised].cancelDark { } .ui-page-theme-b paper-button.subdued:not([disabled]) { - color: #484848; + color: #404040; } .ui-page-theme-b paper-button[raised].subdued:not([disabled]) { - background: #484848; + background: #404040; color: #fff; } @@ -114,14 +114,6 @@ paper-button.hover:hover { background: #eee; } -paper-button.ripple::shadow paper-ripple { - color: var(--paper-pink-a200); -} - -paper-button.ripple paper-ripple { - color: var(--paper-pink-a200); -} - paper-button span { vertical-align: middle; } @@ -287,7 +279,7 @@ paper-fab { } paper-fab.subdued { - background: #484848; + background: #404040; color: #fff; }