Skip to content
Permalink
Browse files

Fix trakt & token persistence..

Old typo from the .net core refactor.
  • Loading branch information...
Cazzar committed Sep 5, 2019
1 parent 443992d commit 895c9bd1d3106defaed4bee33710938891356fb0
@@ -910,11 +910,11 @@ public int TraktScrobble(int animeId, int type, int progress, int status)
}

[HttpPost("Trakt/Refresh/{traktID}")]
public string UpdateTraktData(string traktD)
public string UpdateTraktData(string traktID)
{
try
{
TraktTVHelper.UpdateAllInfo(traktD);
TraktTVHelper.UpdateAllInfo(traktID);
}
catch (Exception ex)
{
@@ -258,6 +258,7 @@ public static void RefreshAuthToken()

return;
}

ServerSettings.Instance.TraktTv.AuthToken = string.Empty;
ServerSettings.Instance.TraktTv.RefreshToken = string.Empty;
ServerSettings.Instance.TraktTv.TokenExpirationDate = string.Empty;
@@ -270,6 +271,10 @@ public static void RefreshAuthToken()

logger.Error(ex, "Error in TraktTVHelper.RefreshAuthToken: " + ex);
}
finally
{
ServerSettings.Instance.SaveSettings();
}
}

#endregion
@@ -371,6 +376,7 @@ private static void TraktAutoDeviceTokenWorker(TraktAuthDeviceCodeToken deviceCo
long expireDate = createdAt + validity;

ServerSettings.Instance.TraktTv.TokenExpirationDate = expireDate.ToString();
ServerSettings.Instance.SaveSettings();
break;
}
if (response == TraktStatusCodes.Rate_Limit_Exceeded)

0 comments on commit 895c9bd

Please sign in to comment.
You can’t perform that action at this time.