Files
plezy/lib/models/plex/plex_home.dart
edde746 a33c423985 refactor(models): stop parsing wire fields and enum members nothing consumes
Parse-only DTO surface deleted across trackers and catalog models: quality-preset storageKey/fromStorage round-trips (persistence uses EnumPref on .name), PlexHome's placeholder identity fields (id stays — deriveHomeSecret reads it), SeerrUser.email/avatar, SimklSearchResult.endpointType, SimklDetail.type, SimklAllItemsEntry.status/isShow, TraktCatalogEntry.rank, CatalogItem.relevance, and the never-produced CatalogRankScope.favorited/.seasonal members with their label arms. Tracker root: OAuthProxyStart.expiresIn, TrackerSession.scope/isExpired, copyWith slimmed to its one real parameter, TrackerHttpClient.service. TrackerAccountStore.service and the trackerAccountStore() alias are live (persisted-blob validation, callers) and stay.
2026-08-17 19:02:24 +02:00

23 lines
603 B
Dart

import 'package:json_annotation/json_annotation.dart';
import '../../utils/json_utils.dart';
import 'plex_home_user.dart';
part 'plex_home.g.dart';
@JsonSerializable()
class PlexHome {
@JsonKey(fromJson: flexibleIntOrZero)
final int id;
@JsonKey(defaultValue: <PlexHomeUser>[])
final List<PlexHomeUser> users;
PlexHome({required this.id, required this.users});
factory PlexHome.fromJson(Map<String, dynamic> json) => _$PlexHomeFromJson(json);
Map<String, dynamic> toJson() => _$PlexHomeToJson(this);
PlexHomeUser? get adminUser => users.where((user) => user.admin).firstOrNull;
}