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.
23 lines
603 B
Dart
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;
|
|
}
|