fix(tv): refresh retained spotlight metadata

This commit is contained in:
edde746
2026-07-15 06:40:59 +02:00
parent 3168f6327f
commit ea4bd21977
2 changed files with 16 additions and 1 deletions
@@ -43,4 +43,19 @@ void main() {
controller.value = _item('removed');
expect(controller.resolve(hubs), same(first));
});
test('spotlight controller resolves the latest item instance for a retained selection', () {
final stale = _item('same');
final refreshed = testMediaItem(id: 'same', backend: MediaBackend.plex, kind: MediaKind.movie, title: 'Updated');
final controller = TvSpotlightController(settleDelay: Duration.zero);
addTearDown(controller.dispose);
controller.value = stale;
expect(
controller.resolve([
_hub('one', [refreshed]),
]),
same(refreshed),
);
});
}