From 65b626fe3b6d804c79858fe5e6f745e696612650 Mon Sep 17 00:00:00 2001 From: WindowsMEMZ Date: Sun, 22 Dec 2024 17:08:11 +0800 Subject: [PATCH] Fixed user season archive --- MeowBili/PersonalCenter/UserDetailView.swift | 2 +- MeowBili/Video/SeasonArchiveListView.swift | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/MeowBili/PersonalCenter/UserDetailView.swift b/MeowBili/PersonalCenter/UserDetailView.swift index a972b6df2..4ac487c33 100644 --- a/MeowBili/PersonalCenter/UserDetailView.swift +++ b/MeowBili/PersonalCenter/UserDetailView.swift @@ -1131,7 +1131,7 @@ struct UserDetailView: View { let vlist = respJson["data"]["list"]["vlist"] for video in vlist { var data = ["Title": video.1["title"].string ?? "[加载失败]", "Length": video.1["length"].string ?? "E", "PlayCount": String(video.1["play"].int ?? -1), "PicUrl": video.1["pic"].string ?? "E", "BV": video.1["bvid"].string ?? "E", "Timestamp": String(video.1["created"].int ?? 0), "DanmakuCount": String(video.1["video_review"].int ?? -1)] - if video.1["meta"].dictionary != nil { + if video.1["meta"].dictionary != nil && video.1["meta"]["sign_state"].int != 0 { let season = video.1["meta"] data.updateValue(season["title"].string ?? "[加载失败]", forKey: "Title") data.updateValue(season["cover"].string ?? "E", forKey: "PicUrl") diff --git a/MeowBili/Video/SeasonArchiveListView.swift b/MeowBili/Video/SeasonArchiveListView.swift index 56f1bbe7b..733b2d393 100644 --- a/MeowBili/Video/SeasonArchiveListView.swift +++ b/MeowBili/Video/SeasonArchiveListView.swift @@ -109,6 +109,7 @@ struct SeasonArchiveListView: View { for video in respJson["data"]["archives"] { videos.append(["Title": video.1["title"].string ?? "[加载失败]", "PlayCount": String(video.1["stat"]["view"].int ?? -1), "PicUrl": video.1["pic"].string ?? "E", "BV": video.1["bvid"].string ?? "E"]) } + totalPage = Int((respJson["data"]["page"]["total"].int ?? 0) / 20) + 1 } } }