Drops dead code across services, models, utils and widgets, including the connection auth service, which had no implementer, and the Live TV DVR provisioning models, which had no caller. Tests that only covered deleted behaviour are removed or trimmed. No behaviour change.
41 lines
1.1 KiB
Dart
41 lines
1.1 KiB
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(readValue: readStringField, defaultValue: '')
|
|
final String name;
|
|
@JsonKey(fromJson: flexibleInt)
|
|
final int? guestUserID;
|
|
@JsonKey(readValue: readStringField, defaultValue: '')
|
|
final String guestUserUUID;
|
|
@JsonKey(fromJson: flexibleBool)
|
|
final bool guestEnabled;
|
|
@JsonKey(fromJson: flexibleBool)
|
|
final bool subscription;
|
|
@JsonKey(defaultValue: <PlexHomeUser>[])
|
|
final List<PlexHomeUser> users;
|
|
|
|
PlexHome({
|
|
required this.id,
|
|
required this.name,
|
|
required this.guestUserID,
|
|
required this.guestUserUUID,
|
|
required this.guestEnabled,
|
|
required this.subscription,
|
|
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;
|
|
}
|