diff --git a/BilibiliLive/Component/Video/VideoPlayerViewController.swift b/BilibiliLive/Component/Video/VideoPlayerViewController.swift index a4a0a4b4..c052d66c 100644 --- a/BilibiliLive/Component/Video/VideoPlayerViewController.swift +++ b/BilibiliLive/Component/Video/VideoPlayerViewController.swift @@ -267,6 +267,8 @@ extension VideoPlayerViewController { } } showErrorAlertAndExit(message: "请求失败\(code) \(message),可能需要大会员") + } else if info?.is_upower_exclusive == true { + showErrorAlertAndExit(message: "请求失败,该视频为充电专属视频 \(err)") } else { showErrorAlertAndExit(message: "请求失败,\(err)") } diff --git a/BilibiliLive/Request/WebRequest.swift b/BilibiliLive/Request/WebRequest.swift index ecf2c0e7..39aaedb4 100644 --- a/BilibiliLive/Request/WebRequest.swift +++ b/BilibiliLive/Request/WebRequest.swift @@ -783,6 +783,7 @@ struct PlayerInfo: Codable { let view_points: [ViewPoint]? let dm_mask: MaskInfo? let last_play_cid: Int + let is_upower_exclusive: Bool? var playTimeInSecond: Int { last_play_time / 1000 } @@ -847,7 +848,7 @@ struct VideoPlayURLInfo: Codable { let format: String let new_description: String let display_desc: String - let codecs: [String] + let codecs: [String]? } struct DashInfo: Codable {