Files
plezy/lib/models/seerr/seerr_media.g.dart
edde746 a029b1a7c8 fix(seerr): decode media status per product and model failed/completed request states
Jellyseerr shifts MediaStatus codes 6/7 relative to Overseerr (6=blocklisted, 7=deleted vs 6=deleted), and the shared unconditional mapping misread both. The product is now detected from the presence of mediaServerType in /settings/public, persisted on the session, and used to resolve raw wire codes; blocklisted titles are shown as non-requestable.

Request statuses failed(4) and completed(5) previously decoded as pending, blocking re-requests and mislabeling failures; both are now modeled and active requests are defined positively as pending or approved. Seerr also marks a request Failed on arr-push failure while leaving the media status Processing, and precedence checked processing first, so failed titles rendered as Processing and the request sheet kept blocking re-requests; a failed request with no live pending/approved request now wins over stale pipeline status in both the catalog state and the sheet's blocked labels.

Reauthentication completing from a stale session snapshot wholesale-replaced the session and could downgrade a concurrently detected product discriminator back to unknown permanently (the settings cache never reapplies it); adoption now merges the known product.
2026-08-21 19:23:42 +02:00

55 lines
2.2 KiB
Dart

// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'seerr_media.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
SeerrMedia _$SeerrMediaFromJson(Map<String, dynamic> json) => SeerrMedia(
id: (json['id'] as num).toInt(),
mediaType: json['mediaType'] as String?,
title: json['title'] as String?,
name: json['name'] as String?,
overview: json['overview'] as String?,
posterPath: json['posterPath'] as String?,
backdropPath: json['backdropPath'] as String?,
releaseDate: json['releaseDate'] as String?,
firstAirDate: json['firstAirDate'] as String?,
voteAverage: (json['voteAverage'] as num?)?.toDouble(),
voteCount: (json['voteCount'] as num?)?.toInt(),
mediaInfo: json['mediaInfo'] == null
? null
: SeerrMediaInfo.fromJson(json['mediaInfo'] as Map<String, dynamic>),
popularity: (json['popularity'] as num?)?.toDouble(),
originalLanguage: json['originalLanguage'] as String?,
originalTitle: json['originalTitle'] as String?,
originalName: json['originalName'] as String?,
adult: json['adult'] as bool?,
originCountry: (json['originCountry'] as List<dynamic>?)
?.map((e) => e as String)
.toList(),
);
SeerrMediaInfo _$SeerrMediaInfoFromJson(Map<String, dynamic> json) =>
SeerrMediaInfo(
id: (json['id'] as num?)?.toInt(),
tmdbId: (json['tmdbId'] as num?)?.toInt(),
tvdbId: (json['tvdbId'] as num?)?.toInt(),
statusCode: (json['status'] as num?)?.toInt(),
status4kCode: (json['status4k'] as num?)?.toInt(),
seasons: (json['seasons'] as List<dynamic>?)
?.map((e) => SeerrSeasonInfo.fromJson(e as Map<String, dynamic>))
.toList(),
requests: (json['requests'] as List<dynamic>?)
?.map((e) => SeerrRequest.fromJson(e as Map<String, dynamic>))
.toList(),
);
SeerrSeasonInfo _$SeerrSeasonInfoFromJson(Map<String, dynamic> json) =>
SeerrSeasonInfo(
seasonNumber: (json['seasonNumber'] as num).toInt(),
statusCode: (json['status'] as num?)?.toInt(),
status4kCode: (json['status4k'] as num?)?.toInt(),
);