core/artwork comments

This commit is contained in:
perennial
2024-10-25 15:32:19 +11:00
parent 2d39ebe646
commit 673516ba3b
+3 -2
View File
@@ -444,7 +444,8 @@ func GetArtworkByID(auditor *audit.Auditor, r *http.Request, id string, full boo
}()
}
// We only fetch comments if full details are requested and comments are enabled (since disabled comments would lead to unnecessary API calls).
// We only fetch comments if full details are requested and comments are enabled.
//
// This condition is evaluated *after* fetching basic artwork information since we first need the comment-off flag.
if full && illust.CommentDisabled != 1 {
wg.Add(1)
@@ -481,7 +482,7 @@ func GetArtworkByID(auditor *audit.Auditor, r *http.Request, id string, full boo
return nil, err_summary
}
// Pixiv has a specific art format called ugoira (animated illustrations); if detected, flag this artwork as such for further handling by the Jet template engine.
// If detected, flag this artwork as a ugoira for further handling by the Jet template engine.
illust.IsUgoira = strings.Contains(illust.Images[0].Original, "ugoira")
// Return the fully assembled `illust` object, complete with metadata, images, related works, tags, and comments (if requested in full mode).