mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-06 18:26:33 +00:00
fixes #762 - Marking unwatched doesn't update display
This commit is contained in:
@@ -363,19 +363,15 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||
{
|
||||
try
|
||||
{
|
||||
var errorResponse = new ErrorResponse
|
||||
{
|
||||
ResponseStatus = new ResponseStatus
|
||||
{
|
||||
ErrorCode = ex.GetType().GetOperationName(),
|
||||
Message = ex.Message,
|
||||
StackTrace = ex.StackTrace,
|
||||
}
|
||||
};
|
||||
|
||||
var operationName = context.Request.GetOperationName();
|
||||
var httpReq = GetRequest(context, operationName);
|
||||
var httpRes = httpReq.Response;
|
||||
|
||||
if (httpRes.IsClosed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var contentType = httpReq.ResponseContentType;
|
||||
|
||||
var serializer = HostContext.ContentTypes.GetResponseSerializer(contentType);
|
||||
@@ -398,6 +394,16 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||
|
||||
httpRes.ContentType = contentType;
|
||||
|
||||
var errorResponse = new ErrorResponse
|
||||
{
|
||||
ResponseStatus = new ResponseStatus
|
||||
{
|
||||
ErrorCode = ex.GetType().GetOperationName(),
|
||||
Message = ex.Message,
|
||||
StackTrace = ex.StackTrace,
|
||||
}
|
||||
};
|
||||
|
||||
serializer(httpReq, errorResponse, httpRes);
|
||||
|
||||
httpRes.Close();
|
||||
|
||||
@@ -36,6 +36,13 @@ namespace MediaBrowser.Server.Implementations.HttpServer.Security
|
||||
auth.TryGetValue("Version", out version);
|
||||
}
|
||||
|
||||
var token = httpReq.Headers["X-MediaBrowser-Token"];
|
||||
|
||||
if (string.IsNullOrWhiteSpace(token))
|
||||
{
|
||||
token = httpReq.QueryString["api_key"];
|
||||
}
|
||||
|
||||
return new AuthorizationInfo
|
||||
{
|
||||
Client = client,
|
||||
@@ -43,7 +50,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer.Security
|
||||
DeviceId = deviceId,
|
||||
UserId = userId,
|
||||
Version = version,
|
||||
Token = httpReq.Headers["X-AUTH-TOKEN"]
|
||||
Token = token
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user