Skip to content

Commit

Permalink
fix: add notice when play exclusive video fail
Browse files Browse the repository at this point in the history
  • Loading branch information
yichengchen committed Jan 27, 2024
1 parent cf64412 commit 65dedbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions BilibiliLive/Component/Video/VideoPlayerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ extension VideoPlayerViewController {
}
}
showErrorAlertAndExit(message: "请求失败\(code) \(message),可能需要大会员")
} else if info?.is_upower_exclusive == true {
showErrorAlertAndExit(message: "请求失败,该视频为充电专属视频 \(err)")
} else {
showErrorAlertAndExit(message: "请求失败,\(err)")
}
Expand Down
3 changes: 2 additions & 1 deletion BilibiliLive/Request/WebRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 65dedbe

Please sign in to comment.