mirror of
https://github.com/yattee/yattee.git
synced 2024-12-13 05:40:32 +05:30
More channel cache
This commit is contained in:
parent
4330856c5e
commit
960e7bdaf1
@ -140,7 +140,12 @@ struct Channel: Identifiable, Hashable {
|
|||||||
"app": app.rawValue,
|
"app": app.rawValue,
|
||||||
"id": id,
|
"id": id,
|
||||||
"name": name,
|
"name": name,
|
||||||
"thumbnailURL": thumbnailURL?.absoluteString ?? "",
|
"bannerURL": bannerURL?.absoluteString as Any,
|
||||||
|
"thumbnailURL": thumbnailURL?.absoluteString as Any,
|
||||||
|
"subscriptionsCount": subscriptionsCount as Any,
|
||||||
|
"subscriptionsText": subscriptionsText as Any,
|
||||||
|
"totalViews": totalViews as Any,
|
||||||
|
"verified": verified as Any,
|
||||||
"videos": videos.map { $0.json.object }
|
"videos": videos.map { $0.json.object }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -150,7 +155,11 @@ struct Channel: Identifiable, Hashable {
|
|||||||
app: VideosApp(rawValue: json["app"].stringValue) ?? .local,
|
app: VideosApp(rawValue: json["app"].stringValue) ?? .local,
|
||||||
id: json["id"].stringValue,
|
id: json["id"].stringValue,
|
||||||
name: json["name"].stringValue,
|
name: json["name"].stringValue,
|
||||||
|
bannerURL: json["bannerURL"].url,
|
||||||
thumbnailURL: json["thumbnailURL"].url,
|
thumbnailURL: json["thumbnailURL"].url,
|
||||||
|
subscriptionsCount: json["subscriptionsCount"].int,
|
||||||
|
subscriptionsText: json["subscriptionsText"].string,
|
||||||
|
totalViews: json["totalViews"].int,
|
||||||
videos: json["videos"].arrayValue.map { Video.from($0) }
|
videos: json["videos"].arrayValue.map { Video.from($0) }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user