add more sync indicators

This commit is contained in:
Luke Pulverenti 2015-06-03 11:26:39 -04:00
parent 2771dd6289
commit 5c5d7d034b
2 changed files with 21 additions and 11 deletions

View File

@ -675,10 +675,18 @@ namespace MediaBrowser.Api.Images
private 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)
{
supportsWebP = true;
}
if (supportsWebP)
{
// Not displaying properly on iOS
if (userAgent.IndexOf("cfnetwork", StringComparison.OrdinalIgnoreCase) == -1)
{

View File

@ -376,6 +376,11 @@ namespace MediaBrowser.Server.Implementations.Connect
public 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.Connect
throw 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.Connect
public 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.Connect
throw new ArgumentNullException("connectUsername");
}
if (string.IsNullOrWhiteSpace(ConnectServerId))
{
await UpdateConnectInfo().ConfigureAwait(false);
}
if (string.IsNullOrWhiteSpace(ConnectServerId))
{
throw new ArgumentNullException("ConnectServerId");
}