The Free Software Media System - Server Backend & API
add more sync indicators
Luke Pulverenti5c5d7d034b09
diff --git a/MediaBrowser.Api/Images/ImageService.cs b/MediaBrowser.Api/Images/ImageService.csindex 8c6cc0a18e..b8ea621375 100644--- a/MediaBrowser.Api/Images/ImageService.cs+++ b/MediaBrowser.Api/Images/ImageService.cs@@ -675,10 +675,18 @@ namespace MediaBrowser.Api.Imagesprivate ImageFormat[] GetClientSupportedFormats(){- if ((Request.AcceptTypes ?? new string[] { }).Contains("image/webp", StringComparer.OrdinalIgnoreCase))+ var supportsWebP = (Request.AcceptTypes ?? new string[] {}).Contains("image/webp", StringComparer.OrdinalIgnoreCase);++ var userAgent = Request.UserAgent ?? string.Empty;++ if (userAgent.IndexOf("crosswalk", StringComparison.OrdinalIgnoreCase) != -1 &&+ userAgent.IndexOf("android", StringComparison.OrdinalIgnoreCase) != -1){- var userAgent = Request.UserAgent ?? string.Empty;+ supportsWebP = true;+ }+ if (supportsWebP)+ {// Not displaying properly on iOSif (userAgent.IndexOf("cfnetwork", StringComparison.OrdinalIgnoreCase) == -1){diff --git a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs b/MediaBrowser.Server.Implementations/Connect/ConnectManager.csindex 048287faa4..4569503c01 100644--- a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs+++ b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs@@ -376,6 +376,11 @@ namespace MediaBrowser.Server.Implementations.Connectpublic async Task<UserLinkResult> LinkUser(string userId, string connectUsername){+ if (string.IsNullOrWhiteSpace(ConnectServerId))+ {+ await UpdateConnectInfo().ConfigureAwait(false);+ }+await _operationLock.WaitAsync().ConfigureAwait(false);try@@ -399,10 +404,6 @@ namespace MediaBrowser.Server.Implementations.Connectthrow new ArgumentNullException("connectUsername");}if (string.IsNullOrWhiteSpace(ConnectServerId))- {- await UpdateConnectInfo().ConfigureAwait(false);- }- if (string.IsNullOrWhiteSpace(ConnectServerId)){throw new ArgumentNullException("ConnectServerId");}@@ -474,6 +475,11 @@ namespace MediaBrowser.Server.Implementations.Connectpublic async Task<UserLinkResult> InviteUser(ConnectAuthorizationRequest request){+ if (string.IsNullOrWhiteSpace(ConnectServerId))+ {+ await UpdateConnectInfo().ConfigureAwait(false);+ }+await _operationLock.WaitAsync().ConfigureAwait(false);try@@ -496,10 +502,6 @@ namespace MediaBrowser.Server.Implementations.Connectthrow new ArgumentNullException("connectUsername");}if (string.IsNullOrWhiteSpace(ConnectServerId))- {- await UpdateConnectInfo().ConfigureAwait(false);- }- if (string.IsNullOrWhiteSpace(ConnectServerId)){throw new ArgumentNullException("ConnectServerId");}