summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-02-27 16:03:31 -0800
committerFuwn <[email protected]>2025-02-27 16:03:31 -0800
commit2d49e952cf6dc13214a92d50a84ceee9f5bc5117 (patch)
tree3256ee3312ab79db74f06d7e32efd5b9906ffb43
parentfeat: Development commit (diff)
downloadsora-testing-2d49e952cf6dc13214a92d50a84ceee9f5bc5117.tar.xz
sora-testing-2d49e952cf6dc13214a92d50a84ceee9f5bc5117.zip
feat: Development commit
-rw-r--r--Sora/Data/Booru/Post/BooruPost.swift4
-rw-r--r--Sora/Data/Booru/Post/BooruPostXMLParser.swift9
2 files changed, 3 insertions, 10 deletions
diff --git a/Sora/Data/Booru/Post/BooruPost.swift b/Sora/Data/Booru/Post/BooruPost.swift
index e2e043e..09ba38b 100644
--- a/Sora/Data/Booru/Post/BooruPost.swift
+++ b/Sora/Data/Booru/Post/BooruPost.swift
@@ -16,12 +16,10 @@ struct BooruPost: Identifiable, Hashable {
let change: String
let md5: String
let creatorID: String
- let hasChildren: Bool
+ let authorID: String?
let createdAt: Date
let status: String
let source: String
- let hasNotes: Bool
- let hasComments: Bool
let previewWidth: Int
let previewHeight: Int
}
diff --git a/Sora/Data/Booru/Post/BooruPostXMLParser.swift b/Sora/Data/Booru/Post/BooruPostXMLParser.swift
index 41ad25d..fe14b7d 100644
--- a/Sora/Data/Booru/Post/BooruPostXMLParser.swift
+++ b/Sora/Data/Booru/Post/BooruPostXMLParser.swift
@@ -87,12 +87,10 @@ class BooruPostXMLParser: NSObject, XMLParserDelegate {
change: change,
md5: md5,
creatorID: creatorId,
- hasChildren: hasChildrenStr == "true",
+ authorID: attributeDict["author_id"],
createdAt: parseCreatedAt(createdAt)!,
status: status,
source: source,
- hasNotes: (attributeDict["has_notes"] ?? "false") == "true",
- hasComments: (attributeDict["has_comments"] ?? "false") == "true",
previewWidth: previewWidth,
previewHeight: previewHeight
)
@@ -139,7 +137,6 @@ class BooruPostXMLParser: NSObject, XMLParserDelegate {
let change = currentPostData["change"],
let md5 = currentPostData["md5"],
let creatorId = currentPostData["creator_id"],
- let hasChildrenStr = currentPostData["has_children"],
let createdAtStr = currentPostData["created_at"],
let createdAt = parseCreatedAt(createdAtStr),
let status = currentPostData["status"],
@@ -170,12 +167,10 @@ class BooruPostXMLParser: NSObject, XMLParserDelegate {
change: change,
md5: md5,
creatorID: creatorId,
- hasChildren: hasChildrenStr == "true",
+ authorID: currentPostData["author_id"],
createdAt: createdAt,
status: status,
source: source,
- hasNotes: (currentPostData["has_notes"] ?? "false") == "true",
- hasComments: (currentPostData["has_comments"] ?? "false") == "true",
previewWidth: previewWidth,
previewHeight: previewHeight
)