mirror of
https://github.com/yattee/yattee.git
synced 2026-05-13 02:45:03 +00:00
Refresh expired thumbnail URLs for downloads and video info
Proxied thumbnail URLs from Invidious/Piped/Yattee server expire over time. Two paths were left holding stale URLs: the Video Info carousel kept the original list copy even after fresh details arrived, and downloaded videos rendered from the remote URL snapshot taken at download time while the local thumbnail on disk was ignored. Evict stale URLs from the Nuke cache when fresh video details load, pass the fresh details through to the videoCard thumbnail, and resolve downloads' thumbnails from the local file when localThumbnailPath is set.
This commit is contained in:
@@ -1142,7 +1142,8 @@ struct HomeView: View {
|
||||
let limitedDownloads = Array(downloads.prefix(sectionItemsLimit))
|
||||
// Use toVideo() instead of videoAndStream() to avoid O(n²) file I/O on main thread
|
||||
// Downloads are looked up by video.id at playback time in PlayerService.playPreferringDownloaded()
|
||||
let videoList = limitedDownloads.map { $0.toVideo() }
|
||||
let downloadsDir = downloadManager?.downloadsDirectory()
|
||||
let videoList = limitedDownloads.map { $0.toVideo(downloadsDirectory: downloadsDir) }
|
||||
|
||||
return VStack(alignment: .leading, spacing: 0) {
|
||||
sectionHeader(title: "home.recentDownloads.title") {
|
||||
|
||||
Reference in New Issue
Block a user