mirror of
https://github.com/yattee/yattee.git
synced 2026-02-20 01:39:46 +00:00
Persist author cache to disk for instant channel info across restarts
Back the in-memory authorCache with a JSON file in ~/Library/Caches/AuthorCache/. Disk is lazy-loaded on first lookup and saved asynchronously on each cache update. Capped at 500 entries to prevent unbounded growth. - Cache author data from video detail API responses (PlayerService, VideoInfoView) - Replace ChannelView's private CachedChannelHeader with shared CachedChannelData - Enrich author with cached avatar/subscriber count in VideoChannelRow, TVDetailsPanel, VideoInfoView
This commit is contained in:
@@ -303,6 +303,7 @@ final class PlayerService {
|
||||
|
||||
// Update state with full video details and selected stream
|
||||
state.setCurrentVideo(fullVideo, stream: selectedStream, audioStream: selectedAudioStream)
|
||||
CachedChannelData.cacheAuthor(fullVideo.author)
|
||||
state.videoDetailsState = .loaded
|
||||
lockDurationIfNeeded(for: fullVideo, stream: selectedStream)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user