Fixed the issue where Emby connect users could not log in #2115

This commit is contained in:
Jamie 2018-04-02 20:42:02 +01:00
parent cbaaaa4405
commit e9ef0136e4
3 changed files with 18 additions and 4 deletions

View file

@ -77,13 +77,19 @@ namespace Ombi.Api.Emby
request.AddJsonBody(body); request.AddJsonBody(body);
request.AddHeader("Accept", "application/json"); AddEmbyHeaders(request);
request.AddContentHeader("Content-Type", "application/json");
var obj = await Api.Request<EmbyConnectUser>(request); var obj = await Api.Request<EmbyConnectUser>(request);
return obj; return obj;
} }
private static void AddEmbyHeaders(Request request)
{
request.AddHeader("Accept", "application/json");
request.AddHeader("X-Application", $"Ombi/{AssemblyHelper.GetRuntimeVersion()}");
request.AddContentHeader("Content-Type", "application/json");
}
public async Task<EmbyItemContainer<MovieInformation>> GetCollection(string mediaId, string apiKey, string userId, string baseUrl) public async Task<EmbyItemContainer<MovieInformation>> GetCollection(string mediaId, string apiKey, string userId, string baseUrl)
{ {
var request = new Request($"emby/users/{userId}/items?parentId={mediaId}", baseUrl, HttpMethod.Get); var request = new Request($"emby/users/{userId}/items?parentId={mediaId}", baseUrl, HttpMethod.Get);

View file

@ -349,3 +349,6 @@ button.list-group-item:focus {
height: 100%; height: 100%;
position: absolute; position: absolute;
} }
table.table > thead > tr > th.active {
background-color: transparent;
}

View file

@ -10,6 +10,10 @@ $danger-colour: #d9534f;
$success-colour: #5cb85c; $success-colour: #5cb85c;
$i: !important; $i: !important;
table > thead > tr > th.active {
background-color: transparent;
}
@media (min-width: 768px ) { @media (min-width: 768px ) {
.bottom-align-text { .bottom-align-text {
position: absolute; position: absolute;
@ -952,3 +956,4 @@ a > h4:hover {
.searchWidth { .searchWidth {
width: 94%; width: 94%;
} }