mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Improved thumbnail handling
- ThumbnailsModel optionally returns the quality - Have constants for 4:3 and 16:9 aspect ratio - Add high quality options for thumbnails - Rename Highest quality to Best quality - make 4:3 thumbnails fill the VideoCell - use .maxes instead of .maxresdefault (the latter sometimes returns white images) Signed-off-by: Toni Förster <toni.foerster@gmail.com>
This commit is contained in:
@@ -219,22 +219,18 @@ struct VideoBanner: View {
|
||||
return watch!.finished ? 0.5 : 1
|
||||
}
|
||||
|
||||
private var thumbnailWidth: Double {
|
||||
#if os(tvOS)
|
||||
356
|
||||
#else
|
||||
120
|
||||
#endif
|
||||
}
|
||||
|
||||
private var thumbnailHeight: Double {
|
||||
#if os(tvOS)
|
||||
200
|
||||
#else
|
||||
72
|
||||
75
|
||||
#endif
|
||||
}
|
||||
|
||||
private var thumbnailWidth: Double {
|
||||
thumbnailHeight * Constants.aspectRatio16x9
|
||||
}
|
||||
|
||||
private var videoDurationLabel: String? {
|
||||
guard videoDuration != 0 else { return nil }
|
||||
return (videoDuration ?? video?.length)?.formattedAsPlaybackTime()
|
||||
|
Reference in New Issue
Block a user