1.0 library + player settings: Jellyfin/Link/Files library with details panel, player gear, settings cards, host flag
Library: source switch, selectable cards with a details panel, one merged Continue row, Latest grouped per series without re-releases, Link page with previews and recent links, Files embedded. Player: gear popover in both designs, progress line while controls hide, live hwdec. Settings rebuilt as cards. State marks the host member (proto stays 9, unreleased); hosting shows LAN invite addresses; window buttons in fullscreen. fadeThrough keeps the outgoing view's state. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
99cda7ed04
commit
d092ea371a
54 files changed
+4963
-1825
No files matched your search
@@ -24,6 +24,7 @@ const _keyAccounts = 'accounts';
|
||||
const _keyDefault = 'defaultServer';
|
||||
const _keyLastPick = 'lastPick';
|
||||
const _keyBrowsePrefix = 'browse:';
|
||||
const _keyDismissedPrefix = 'dismissed:';
|
||||
|
||||
/// One signed-in user on one server.
|
||||
class JellyfinAccount {
|
||||
@@ -484,6 +485,38 @@ class JellyfinAccounts extends ChangeNotifier {
|
||||
}
|
||||
}
|
||||
|
||||
/// Continue-row entries removed by hand on [serverId] (key -> when), so a
|
||||
/// next-up series (which Jellyfin cannot drop) stays out until it is
|
||||
/// played again. Keys are `continueKey`s.
|
||||
Map<String, DateTime> continueDismissed(String serverId) {
|
||||
try {
|
||||
final v = _store.get('$_keyDismissedPrefix$serverId');
|
||||
final j = v is String ? _tryJson(v) : null;
|
||||
if (j is! Map) return const {};
|
||||
return {
|
||||
for (final e in j.entries)
|
||||
if (e.key is String && e.value is int)
|
||||
e.key as String: DateTime.fromMillisecondsSinceEpoch(e.value as int, isUtc: true),
|
||||
};
|
||||
} catch (_) {
|
||||
return const {};
|
||||
}
|
||||
}
|
||||
|
||||
/// Keeps [key] out of the Continue row on [serverId] until it is played
|
||||
/// after [at] (default now). The newest 200 are kept.
|
||||
Future<void> dismissContinue(String serverId, String key, {DateTime? at}) async {
|
||||
final all = {...continueDismissed(serverId), key: (at ?? DateTime.now()).toUtc()};
|
||||
final newest = all.entries.toList()..sort((a, b) => b.value.compareTo(a.value));
|
||||
try {
|
||||
await _store.put('$_keyDismissedPrefix$serverId', jsonEncode({
|
||||
for (final e in newest.take(200)) e.key: e.value.millisecondsSinceEpoch,
|
||||
}));
|
||||
} catch (e) {
|
||||
debugPrint('save dismissed continue failed: $e');
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------- cache
|
||||
|
||||
/// Short-lived memo for browse calls, so going back does not refetch.
|
||||
|
||||
Reference in new issue
Block a user