Skip to content

Commit

Permalink
fix: 修正直播列表解析
Browse files Browse the repository at this point in the history
  • Loading branch information
yichengchen committed Oct 16, 2024
1 parent d894552 commit b420caa
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions BilibiliLive/Module/Live/LiveViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,18 @@ struct LiveRoom: DisplayData, Codable {
let title: String
let room_id: Int
let uname: String
let keyframe: URL?
let keyframe: String?
let face: URL?
let cover_from_user: URL?

var ownerName: String { uname }
var pic: URL? { keyframe }
var pic: URL? {
if let keyframe {
return URL(string: keyframe)
}
return nil
}

var avatar: URL? { face }
}

Expand Down Expand Up @@ -161,6 +167,6 @@ struct AreaLiveRoom: DisplayData, Codable, PlayableData {
var aid: Int { 0 }

func toLiveRoom() -> LiveRoom {
return LiveRoom(title: title, room_id: roomid, uname: uname, keyframe: system_cover, face: face, cover_from_user: user_cover)
return LiveRoom(title: title, room_id: roomid, uname: uname, keyframe: system_cover.absoluteString, face: face, cover_from_user: user_cover)
}
}

0 comments on commit b420caa

Please # to comment.