refactor: share focus chrome and simplify the TV picker and browse paths
Focus chrome was implemented twice, once in the focusable wrapper and once in the focus builders; both now go through FocusChrome. TvColorPicker's channel row was a copy of TvNumberSpinner and is now that widget in compact density. Also trims unused helpers and fields and simplifies the Jellyfin browse paths.
This commit is contained in:
@@ -10,8 +10,7 @@ part 'plex_user_profile.g.dart';
|
||||
///
|
||||
/// Every field parses tolerantly: the account API drifts (~July 2026 the
|
||||
/// language-list fields switched from arrays to CSV strings, #1488), and a
|
||||
/// profile blob must never fail to parse — token minting embeds it (see
|
||||
/// UserSwitchResponse.fromJson).
|
||||
/// single drifted field must never sink the whole profile.
|
||||
@JsonSerializable()
|
||||
class PlexUserProfile implements MediaServerUserProfile {
|
||||
@JsonKey(fromJson: _boolOrTrue)
|
||||
@@ -62,19 +61,6 @@ class PlexUserProfile implements MediaServerUserProfile {
|
||||
this.mediaReviewsLanguages,
|
||||
});
|
||||
|
||||
/// Neutral fallback matching the generated defaults — used when the account
|
||||
/// API returns a profile blob that cannot be parsed at all (schema drift
|
||||
/// must never break token minting, see UserSwitchResponse.fromJson).
|
||||
factory PlexUserProfile.defaults() => PlexUserProfile(
|
||||
autoSelectAudio: true,
|
||||
defaultAudioAccessibility: 0,
|
||||
autoSelectSubtitle: 0,
|
||||
defaultSubtitleAccessibility: 0,
|
||||
defaultSubtitleForced: 1,
|
||||
watchedIndicator: 1,
|
||||
mediaReviewsVisibility: 0,
|
||||
);
|
||||
|
||||
factory PlexUserProfile.fromJson(Map<String, dynamic> json) {
|
||||
final envelope = json['profile'];
|
||||
final profile = envelope is Map<String, dynamic> ? envelope : json;
|
||||
|
||||
Reference in New Issue
Block a user