Don't use cache to ApplySettings and CreateProfile

also use a wrapper function to set default settings in config.go so it's
less ugly.
This commit is contained in:
Harvey Tindall
2021-02-28 18:26:22 +00:00
parent 1ec5d2ca3f
commit fa7da1b23f
2 changed files with 25 additions and 20 deletions
+1
View File
@@ -794,6 +794,7 @@ func (app *appContext) CreateProfile(gc *gin.Context) {
app.info.Println("Profile creation requested")
var req newProfileDTO
gc.BindJSON(&req)
app.jf.CacheExpiry = time.Now()
user, status, err := app.jf.UserByID(req.ID, false)
if !(status == 200 || status == 204) || err != nil {
app.err.Printf("Failed to get user from Jellyfin (%d): %s", status, err)