Files
plezy/lib/models/simkl/simkl_search_result.dart
T
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

48 lines
1.1 KiB
Dart

import 'package:json_annotation/json_annotation.dart';
import '../../utils/json_utils.dart';
import 'simkl_ids.dart';
import 'simkl_rating.dart';
part 'simkl_search_result.g.dart';
@JsonSerializable(createToJson: false)
class SimklSearchResult {
final String? title;
@JsonKey(name: 'title_en')
final String? titleEn;
@JsonKey(name: 'title_romaji')
final String? titleRomaji;
@JsonKey(name: 'all_titles', fromJson: flexibleStringList)
final List<String>? allTitles;
final String? url;
@JsonKey(fromJson: flexibleInt)
final int? year;
/// Anime format (`tv`, `movie`, `ova`, ...).
final String? type;
final String? poster;
final SimklIds ids;
@JsonKey(name: 'ep_count', fromJson: flexibleInt)
final int? episodeCount;
final String? status;
final SimklRatings? ratings;
const SimklSearchResult({
this.title,
this.titleEn,
this.titleRomaji,
this.allTitles,
this.url,
this.year,
this.type,
this.poster,
required this.ids,
this.episodeCount,
this.status,
this.ratings,
});
factory SimklSearchResult.fromJson(Map<String, dynamic> json) => _$SimklSearchResultFromJson(json);
}