Solo watching and a clearer offline start

Putting anything up offline starts a solo session: an in-app server bound
to 127.0.0.1 only, joined like hosting, so tracking, next episode and the
player all work. Invite friends re-hosts on the Host card's port and
password with the same media and position; Stop needs no confirmation.
Offline, the Library opens with a welcome band (Join a friend, Host, Watch
solo); without a Jellyfin account it leads with Files and Link, Jellyfin
is an optional card. Play buttons work offline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
foxyzandClaude Opus 5.5 committed 2026-10-09 23:08:11 +03:00
1 parent 8186fbb5d3
commit e0db5cc655
28 files changed
+1013 -345

No files matched your search

+5 -5
View File
@@ -231,7 +231,7 @@ void main() {
WidgetTester tester, {
Size size = const Size(2560, 1080),
ScheduleSnapshot Function()? snap,
bool online = true,
bool solo = false,
JellyfinAccounts? accounts,
}) async {
toasts.clear();
@@ -245,7 +245,7 @@ void main() {
theme: ThemeData.dark(),
home: Scaffold(
body: SchedulePage(
online: online,
solo: solo,
repository: repo,
accounts: accounts,
onToast: toasts.add,
@@ -434,11 +434,11 @@ void main() {
await done(tester);
});
testWidgets('offline: Play is disabled', (tester) async {
await pumpPage(tester, online: false);
testWidgets('solo: the button says Play and works', (tester) async {
await pumpPage(tester, solo: true);
expect(find.text('Put it up'), findsNothing);
final b = widgetOf<ButtonStyleButton>(tester, action(111, 3));
expect(b.onPressed, isNull);
expect(b.onPressed, isNotNull);
expect(find.text('Play'), findsOneWidget);
await done(tester);
});