fix(tv): prefer show art for episode backdrops

close #1123
This commit is contained in:
edde746
2026-05-25 21:08:33 +02:00
parent 9365fcf246
commit 50be8565d9
2 changed files with 24 additions and 1 deletions
+18
View File
@@ -100,6 +100,24 @@ void main() {
expect(movie.heroArtCandidates(containerAspectRatio: 16 / 9), ['/art', '/square']);
expect(movie.heroArt(containerAspectRatio: 16 / 9), '/art');
});
test('episodes prefer show art before episode art for wide hero containers', () {
final episode = MediaItem(
id: 'e1',
backend: MediaBackend.plex,
kind: MediaKind.episode,
title: 'Episode',
grandparentTitle: 'Show',
grandparentArtPath: '/show-art',
artPath: '/episode-art',
backgroundSquarePath: '/square',
serverId: 's1',
);
expect(episode.heroArtCandidates(containerAspectRatio: 16 / 9), ['/show-art', '/episode-art', '/square']);
expect(episode.heroArt(containerAspectRatio: 16 / 9), '/show-art');
expect(episode.heroArtCandidates(containerAspectRatio: 1.0), ['/square', '/show-art', '/episode-art']);
});
});
group('MediaItem.isPartiallyWatched', () {