ombi: fix password reset on default route

the ombi password wasn't being changed w/ password resets initiated
through the admin page (and probably by other routes, too), as the code
was considering a HTTP 204 from Jellyfin as a failure, causing it to
skip anything with Ombi. Also added a little check for Ombi-imported
accounts that probably won't help with anything, but whatever.
This commit is contained in:
Harvey Tindall
2023-10-09 10:39:22 +01:00
parent 4864c6c53c
commit cf94fdb2f0
3 changed files with 56 additions and 34 deletions
+1 -1
View File
@@ -182,7 +182,7 @@ func (app *appContext) ResetSetPassword(gc *gin.Context) {
}
if app.config.Section("ombi").Key("enabled").MustBool(false) {
// Silently fail for changing ombi passwords
if status != 200 || err != nil {
if (status != 200 && status != 204) || err != nil {
app.err.Printf("Failed to get user \"%s\" from jellyfin/emby (%d): %v", username, status, err)
respondBool(200, true, gc)
return