Videos cache model

This commit is contained in:
Arkadiusz Fal
2022-12-10 01:23:13 +01:00
parent 0c960c2461
commit 64146b26c2
12 changed files with 204 additions and 9 deletions

View File

@@ -109,4 +109,18 @@ struct Channel: Identifiable, Hashable {
guard contentType != .videos, contentType != .playlists else { return true }
return tabs.contains { $0.contentType == contentType }
}
var json: JSON {
[
"id": id,
"name": name
]
}
static func from(_ json: JSON) -> Self {
.init(
id: json["id"].stringValue,
name: json["name"].stringValue
)
}
}