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:
edde746
2026-07-26 06:09:49 +02:00
parent c68ffe9ed0
commit 4eaf4423a1
47 changed files with 526 additions and 1133 deletions
-43
View File
@@ -61,47 +61,4 @@ void main() {
expect(result, equals(first));
});
});
group('PlexCacheParser.extractChapters', () {
test('returns null for null input', () {
expect(PlexCacheParser.extractChapters(null), isNull);
});
test('returns null when no metadata', () {
expect(
PlexCacheParser.extractChapters({
'MediaContainer': {'Metadata': []},
}),
isNull,
);
});
test('returns null when first metadata has no Chapter key', () {
expect(
PlexCacheParser.extractChapters({
'MediaContainer': {
'Metadata': [
<String, dynamic>{'ratingKey': '1'},
],
},
}),
isNull,
);
});
test('returns chapter list when present', () {
final chapters = [
{'tag': 'Chapter 1'},
{'tag': 'Chapter 2'},
];
final result = PlexCacheParser.extractChapters({
'MediaContainer': {
'Metadata': [
{'ratingKey': '1', 'Chapter': chapters},
],
},
});
expect(result, equals(chapters));
});
});
}