fix(jellyfin): a tap on someone a server shows names them, the password asked

Jellyfin v10.11 and later no longer say which accounts have a password
(HasPassword is always true, jellyfin/jellyfin#14950), so the demo's
account was listed as "With a password" and only named in the form.
Every listed account is now named in the form with the password field
focused, which says to leave it empty for an account without one, as
Jellyfin's own apps do; the line under each account goes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-14 01:52:42 +02:00
commit 107160cac4
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -32,10 +32,13 @@ class FakeJellyfinGateway({
/// Whether the Quick Connect code was approved.
bool approved = false;
/// The people the server shows on its login screen; those without a
/// password sign in with none.
/// The people the server shows on its login screen; those named in
/// [withoutPassword] sign in with none.
List<JellyfinPublicUser> shownUsers = const [];
/// Names of accounts without a password, as a demo's.
Set<String> withoutPassword = const {};
/// What was reported of playbacks: their positions, in order.
final reports = <({Duration position, bool started, bool stopped})>[];
@ -90,7 +93,9 @@ class FakeJellyfinGateway({
String password,
) async {
for (final public in shownUsers) {
if (public.name == user && !public.hasPassword && password.isEmpty) {
if (public.name == user &&
withoutPassword.contains(user) &&
password.isEmpty) {
return _account('token-3', userId: public.id, userName: public.name);
}
}