fix dlna direct play on samsung tv's

This commit is contained in:
Luke Pulverenti
2017-09-23 21:03:46 -04:00
parent f3120dbee9
commit 39394e74c7
4 changed files with 32 additions and 14 deletions

View File

@@ -2211,19 +2211,36 @@ namespace Emby.Server.Implementations
TimeSpan.FromHours(12) :
TimeSpan.FromMinutes(5);
var result = await new GithubUpdater(HttpClient, JsonSerializer).CheckForUpdateResult("MediaBrowser",
"Emby",
ApplicationVersion,
updateLevel,
ReleaseAssetFilename,
"MBServer",
UpdateTargetFileName,
cacheLength,
cancellationToken).ConfigureAwait(false);
try
{
var result = await new GithubUpdater(HttpClient, JsonSerializer).CheckForUpdateResult("MediaBrowser",
"Emby",
ApplicationVersion,
updateLevel,
ReleaseAssetFilename,
"MBServer",
UpdateTargetFileName,
cacheLength,
cancellationToken).ConfigureAwait(false);
HasUpdateAvailable = result.IsUpdateAvailable;
HasUpdateAvailable = result.IsUpdateAvailable;
return result;
return result;
}
catch (HttpException ex)
{
// users are overreacting to this occasionally failing
if (ex.StatusCode.HasValue && ex.StatusCode.Value == HttpStatusCode.Forbidden)
{
HasUpdateAvailable = false;
return new CheckForUpdateResult
{
IsUpdateAvailable = false
};
}
throw;
}
}
protected virtual string UpdateTargetFileName

View File

@@ -533,7 +533,7 @@ namespace Emby.Server.Implementations.HttpServer
{
stream.Dispose();
return GetHttpResult(new byte[] { }, contentType, true);
return GetHttpResult(new byte[] { }, contentType, true, responseHeaders);
}
var hasHeaders = new StreamWriter(stream, contentType, _logger)