refactor: share focus chrome and simplify the TV picker and browse paths
Focus chrome was implemented twice, once in the focusable wrapper and once in the focus builders; both now go through FocusChrome. TvColorPicker's channel row was a copy of TvNumberSpinner and is now that widget in compact density. Also trims unused helpers and fields and simplifies the Jellyfin browse paths.
This commit is contained in:
@@ -95,21 +95,18 @@ void main() {
|
||||
final movie = _movie(artPath: '/art', backgroundSquarePath: '/square');
|
||||
|
||||
expect(movie.heroArtCandidates(containerAspectRatio: 1.0), ['/square', '/art']);
|
||||
expect(movie.heroArt(containerAspectRatio: 1.0), '/square');
|
||||
});
|
||||
|
||||
test('near-square containers fall back to wide cover art when square art is missing', () {
|
||||
final movie = _movie(artPath: '/art');
|
||||
|
||||
expect(movie.heroArtCandidates(containerAspectRatio: 1.0), ['/art']);
|
||||
expect(movie.heroArt(containerAspectRatio: 1.0), '/art');
|
||||
});
|
||||
|
||||
test('wide containers prefer wide cover art before square art', () {
|
||||
final movie = _movie(artPath: '/art', backgroundSquarePath: '/square');
|
||||
|
||||
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', () {
|
||||
@@ -126,7 +123,6 @@ void main() {
|
||||
);
|
||||
|
||||
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']);
|
||||
});
|
||||
|
||||
|
||||
@@ -126,16 +126,6 @@ void main() {
|
||||
});
|
||||
});
|
||||
|
||||
group('MediaPlaylist.isEditable', () {
|
||||
test('smart playlists are read-only (Plex semantics)', () {
|
||||
expect(_playlist(smart: true).isEditable, isFalse);
|
||||
});
|
||||
|
||||
test('manual playlists are editable', () {
|
||||
expect(_playlist(smart: false).isEditable, isTrue);
|
||||
});
|
||||
});
|
||||
|
||||
group('MediaPlaylist.globalKey', () {
|
||||
test('uses "<serverId>:<id>" when serverId is set', () {
|
||||
final pl = _playlist(id: 'pl-42', serverId: 'srv-9');
|
||||
@@ -166,7 +156,6 @@ void main() {
|
||||
expect(minimal.serverName, isNull);
|
||||
expect(minimal.displayImagePath, isNull);
|
||||
expect(minimal.displayTitle, 'Min');
|
||||
expect(minimal.isEditable, isTrue);
|
||||
// Without a serverId, globalKey reduces to the bare id.
|
||||
expect(minimal.globalKey, 'pl');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user