Channels caching

This commit is contained in:
Arkadiusz Fal
2022-12-14 00:07:32 +01:00
parent d9622cf24c
commit 3b31f21c81
18 changed files with 151 additions and 18 deletions

View File

@@ -410,6 +410,7 @@ final class PipedAPI: Service, ObservableObject, VideosAPI {
} ?? [Channel.Tab]()
return Channel(
app: .piped,
id: id,
name: name,
bannerURL: attributes["bannerUrl"]?.url,
@@ -488,7 +489,7 @@ final class PipedAPI: Service, ObservableObject, VideosAPI {
published: published ?? "",
views: details["views"]?.int ?? 0,
description: description,
channel: Channel(id: channelId, name: author, thumbnailURL: authorThumbnailURL, subscriptionsCount: subscriptionsCount),
channel: Channel(app: .piped, id: channelId, name: author, thumbnailURL: authorThumbnailURL, subscriptionsCount: subscriptionsCount),
thumbnails: thumbnails,
live: live,
likes: details["likes"]?.int,
@@ -667,7 +668,7 @@ final class PipedAPI: Service, ObservableObject, VideosAPI {
likeCount: details["likeCount"]?.int ?? 0,
text: extractCommentText(from: details["commentText"]?.stringValue),
repliesPage: details["repliesPage"]?.string,
channel: Channel(id: channelId, name: author)
channel: Channel(app: .piped, id: channelId, name: author)
)
}