Real-image posters of library titles: use the 500 px copy
Library titles fetched Radarr's/Sonarr's 250×375 poster copy, which real images show at up to 640 pixels, so movie posters looked soft next to series posters that came from the provider's full-size original (Sonarr behind a login). With real images the 500×750 copy is used; block-character posters keep the small one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019reK4DUGYqDUjniWYJvwUW
This commit is contained in:
@@ -468,7 +468,7 @@ func (c *coverView) build(cols, rows int) []styledCell {
|
||||
// coverRef says where a poster comes from. The zero value means "no poster".
|
||||
type coverRef struct {
|
||||
key string // identifies the poster in the cache
|
||||
fetch func(ctx context.Context) ([]byte, error)
|
||||
fetch func(ctx context.Context, large bool) ([]byte, error) // large: for real images
|
||||
}
|
||||
|
||||
// coverFor builds the poster reference of a title from its image list.
|
||||
@@ -516,6 +516,7 @@ func (a *App) loadCover(ref coverRef, done func(*image.RGBA, error)) {
|
||||
}
|
||||
c.waiting[ref.key] = []func(*image.RGBA, error){done}
|
||||
maxHeight := a.coverMaxHeight()
|
||||
large := a.gfx != nil // real images show the poster at full resolution
|
||||
|
||||
go func() {
|
||||
c.slots <- struct{}{}
|
||||
@@ -523,7 +524,7 @@ func (a *App) loadCover(ref coverRef, done func(*image.RGBA, error)) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 25*time.Second)
|
||||
defer cancel()
|
||||
var img *image.RGBA
|
||||
data, err := ref.fetch(ctx)
|
||||
data, err := ref.fetch(ctx, large)
|
||||
if err == nil {
|
||||
img, err = decodeCover(data, maxHeight)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user