Merge pull request #17 from jellyfin/fix-auth

This commit is contained in:
Cody Robibero 2022-06-12 10:17:05 -06:00 committed by GitHub
commit 6271ecb338
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -11,11 +11,13 @@ namespace Jellyfin.Plugin.Simkl.API.Responses
/// <summary>
/// Gets or sets result.
/// </summary>
[JsonPropertyName("result")]
public string? Result { get; set; }
/// <summary>
/// Gets or sets message.
/// </summary>
[JsonPropertyName("message")]
public string? Message { get; set; }
/// <summary>
@ -24,4 +26,4 @@ namespace Jellyfin.Plugin.Simkl.API.Responses
[JsonPropertyName("access_token")]
public string? AccessToken { get; set; }
}
}
}

View File

@ -169,9 +169,9 @@
if (new Date() > this.finish) {
Dashboard.alert("Timed out!");
await this.stopLoginProcess();
} else if (response.Result === "KO") {
} else if (response.result === "KO") {
this.loginTimer = window.setTimeout(this.checkLoginProcess.bind(this, code), code.Interval * 1000);
} else if (response.Result === "OK") {
} else if (response.result === "OK") {
await this.stopLoginProcess();
// Save key on settings
@ -190,7 +190,7 @@
console.log(this.configCache);
ApiClient.updatePluginConfiguration(this.guid, this.configCache);
await ApiClient.updatePluginConfiguration(this.guid, this.configCache);
await this.loadConfig(uguid);
} else {
Dashboard.alert("Error logging in");
@ -310,4 +310,4 @@
</script>
</div>
</body>
</html>
</html>