feat(jellyfin): From Jellyfin once signed in, the panel in the glow's colour, adding the words listed
Add material's entry is now From Jellyfin (Aus Jellyfin), with a play icon rather than a TV, as it plays music too, and shows only once the device is signed in to a server in Settings, as the assistant shows only once switched on; Settings says where it then is. The screen it opens is called Jellyfin, and its search finds music too. The words' panel takes the glow's colour as the scene changes: each copy the glow takes (every 3 s) gives its average, no lighter than 35 % so the text stays readable, as strong as the glow and fading into the next as it does. In the light theme, which has no glow, the panel is tinted from it while the pointer is over it. What lights up in the panel takes a scheme made from the same colour; the episode's thumbnail is no longer used. While the studyset holds none of the video's words, the study button adds the words listed (Add 11 words, as the filter shows them), tagged as a word added alone is; afterwards it studies them, and its menu adds the new ones listed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
c6e7a53dd6
commit
d552f8bea0
1 changed files with 543 additions and 157 deletions
|
|
@ -196,12 +196,21 @@ void main() {
|
|||
// 駅 and 友達 come twice; で, に, を, けど and だ are grammar.
|
||||
expect(words.take(2).toSet(), {'駅', '友達'});
|
||||
expect(words, isNot(contains('で')));
|
||||
expect(words, contains('待つ'));
|
||||
|
||||
final wait = find.textContaining('待つ', findRichText: true).first;
|
||||
await tester.ensureVisible(wait);
|
||||
// Further down the list.
|
||||
final wait = find.textContaining('待つ', findRichText: true);
|
||||
await tester.scrollUntilVisible(
|
||||
wait,
|
||||
100,
|
||||
scrollable: find
|
||||
.descendant(
|
||||
of: find.byType(CustomScrollView),
|
||||
matching: find.byType(Scrollable),
|
||||
)
|
||||
.first,
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(wait);
|
||||
await tester.tap(wait.first);
|
||||
await tester.pumpAndSettle();
|
||||
expect(players.last!.state.value.position, const Duration(seconds: 16));
|
||||
expect(find.text('A form of 待つ'), findsOneWidget);
|
||||
|
|
@ -602,6 +611,11 @@ void main() {
|
|||
|
||||
await tester.tap(find.text('Study'));
|
||||
await tester.pumpAndSettle();
|
||||
// The words listed it lacks can be added from here too.
|
||||
expect(
|
||||
find.textContaining(RegExp(r'^Add the \d+ new words listed$')),
|
||||
findsOneWidget,
|
||||
);
|
||||
await tester.tap(find.text('Cram, each once'));
|
||||
await tester.pump();
|
||||
await tester.pump(const Duration(seconds: 1));
|
||||
|
|
@ -627,6 +641,34 @@ void main() {
|
|||
);
|
||||
});
|
||||
|
||||
testWidgets("with none of the video's words held, the button adds the "
|
||||
'words listed, tagged from Jellyfin, and then studies them', (
|
||||
tester,
|
||||
) async {
|
||||
await watch(tester);
|
||||
|
||||
final add = find.textContaining(RegExp(r'^Add \d+ words$'));
|
||||
expect(add, findsOneWidget);
|
||||
final listed = int.parse(
|
||||
RegExp(r'\d+').firstMatch(tester.widget<Text>(add).data!)![0]!,
|
||||
);
|
||||
expect(listed, greaterThan(1));
|
||||
await tester.tap(add);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('$listed words added'), findsOneWidget);
|
||||
final added = await cards.cardsOf('japanese');
|
||||
expect(added, hasLength(listed));
|
||||
final tagging = await tags.read();
|
||||
for (final card in added) {
|
||||
expect(
|
||||
[for (final tag in tagging.of(card.id)) tag.name],
|
||||
containsAll(['Sample Journey', 'Sample Journey S1 E1']),
|
||||
);
|
||||
}
|
||||
expect(find.text('Study'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets("a song's lyrics move with it, its words looked up as a "
|
||||
"video's; a word added is tagged with the artist and the song", (
|
||||
tester,
|
||||
|
|
|
|||
Loading…
Reference in a new issue