1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-27 02:09:59 +00:00

Fixed: Use User Slug for User List Trakt Requests (Requires Re-Auth for affected users)

Fixes #4168
Fixes #4440
This commit is contained in:
Qstick 2020-05-29 23:35:08 -04:00
parent f2a34e5eda
commit 8112ca5a43
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,5 @@
using System.Collections.Generic;
namespace NzbDrone.Core.NetImport.Trakt namespace NzbDrone.Core.NetImport.Trakt
{ {
public class TraktMovieIdsResource public class TraktMovieIdsResource
@ -49,5 +51,11 @@ public class UserSettingsResponse
public class TraktUserResource public class TraktUserResource
{ {
public string Username { get; set; } public string Username { get; set; }
public TraktUserIdsResource Ids { get; set; }
}
public class TraktUserIdsResource
{
public string Slug { get; set; }
} }
} }

View file

@ -94,7 +94,7 @@ private string GetUserName(string accessToken)
if (response != null && response.Resource != null) if (response != null && response.Resource != null)
{ {
return response.Resource.User.Username; return response.Resource.User.Ids.Slug;
} }
} }
catch (HttpException) catch (HttpException)