diff --git a/src/NzbDrone.Core/NetImport/Trakt/TraktAPI.cs b/src/NzbDrone.Core/NetImport/Trakt/TraktAPI.cs index 62b759bc9..138c1a80f 100644 --- a/src/NzbDrone.Core/NetImport/Trakt/TraktAPI.cs +++ b/src/NzbDrone.Core/NetImport/Trakt/TraktAPI.cs @@ -1,3 +1,5 @@ +using System.Collections.Generic; + namespace NzbDrone.Core.NetImport.Trakt { public class TraktMovieIdsResource @@ -49,5 +51,11 @@ public class UserSettingsResponse public class TraktUserResource { public string Username { get; set; } + public TraktUserIdsResource Ids { get; set; } + } + + public class TraktUserIdsResource + { + public string Slug { get; set; } } } diff --git a/src/NzbDrone.Core/NetImport/Trakt/TraktImportBase.cs b/src/NzbDrone.Core/NetImport/Trakt/TraktImportBase.cs index 4bd57e6ff..6b5fb83ba 100644 --- a/src/NzbDrone.Core/NetImport/Trakt/TraktImportBase.cs +++ b/src/NzbDrone.Core/NetImport/Trakt/TraktImportBase.cs @@ -94,7 +94,7 @@ private string GetUserName(string accessToken) if (response != null && response.Resource != null) { - return response.Resource.User.Username; + return response.Resource.User.Ids.Slug; } } catch (HttpException)