mirror of
https://codeberg.org/VnPower/PixivFE
synced 2024-12-06 19:16:23 +01:00
core/artwork comments
This commit is contained in:
+3
-2
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user