mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Channel playlists cache
This commit is contained in:
@@ -40,8 +40,6 @@ struct Playlist: Identifiable, Equatable, Hashable {
|
||||
}
|
||||
|
||||
var json: JSON {
|
||||
let dateFormatter = ISO8601DateFormatter()
|
||||
|
||||
return [
|
||||
"id": id,
|
||||
"title": title,
|
||||
@@ -53,8 +51,6 @@ struct Playlist: Identifiable, Equatable, Hashable {
|
||||
}
|
||||
|
||||
static func from(_ json: JSON) -> Self {
|
||||
let dateFormatter = ISO8601DateFormatter()
|
||||
|
||||
return .init(
|
||||
id: json["id"].stringValue,
|
||||
title: json["title"].stringValue,
|
||||
@@ -71,4 +67,8 @@ struct Playlist: Identifiable, Equatable, Hashable {
|
||||
func hash(into hasher: inout Hasher) {
|
||||
hasher.combine(id)
|
||||
}
|
||||
|
||||
var channelPlaylist: ChannelPlaylist {
|
||||
ChannelPlaylist(id: id, title: title, videos: videos, videosCount: videos.count)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user