diff --git a/lib/media/media_item.dart b/lib/media/media_item.dart index 35bd99cfa..e606b0340 100644 --- a/lib/media/media_item.dart +++ b/lib/media/media_item.dart @@ -177,8 +177,6 @@ sealed class MediaItem with _$MediaItem { @JsonKey(fromJson: _mediaItemVersionsFromJson) List? mediaVersions, String? libraryId, String? libraryTitle, - String? audioLanguage, - String? subtitleLanguage, String? trailerKey, @JsonKey(fromJson: flexibleInt) int? playlistItemId, @JsonKey(fromJson: flexibleInt) int? playQueueItemId, @@ -266,7 +264,6 @@ sealed class MediaItem with _$MediaItem { @JsonKey(fromJson: _mediaItemVersionsFromJson) List? mediaVersions, String? libraryId, String? libraryTitle, - String? audioLanguage, /// Jellyfin playlist entry id used by playlist write endpoints. String? playlistItemId, diff --git a/lib/media/media_item.freezed.dart b/lib/media/media_item.freezed.dart index 8e6a2063e..ad40046a1 100644 --- a/lib/media/media_item.freezed.dart +++ b/lib/media/media_item.freezed.dart @@ -18,7 +18,7 @@ mixin _$MediaItem { /// listings yield one or two (the `rating`/`audienceRating` pair with /// their source images); `/library/metadata/{id}` adds the `Rating[]` /// array, so IMDb and TMDB join Rotten Tomatoes on detail screens. -@JsonKey(fromJson: _mediaItemRatingsFromJson) List? get ratings; bool? get isFavorite;@JsonKey(fromJson: _mediaItemStringList) List? get genres;@JsonKey(fromJson: _mediaItemStringList) List? get directors;@JsonKey(fromJson: _mediaItemStringList) List? get writers;@JsonKey(fromJson: _mediaItemStringList) List? get producers;@JsonKey(fromJson: _mediaItemStringList) List? get countries;@JsonKey(fromJson: _mediaItemStringList) List? get collections;@JsonKey(fromJson: _mediaItemStringList) List? get labels;@JsonKey(fromJson: _mediaItemStringList) List? get styles;@JsonKey(fromJson: _mediaItemStringList) List? get moods;@JsonKey(fromJson: _mediaItemRolesFromJson) List? get roles;@JsonKey(fromJson: _mediaItemVersionsFromJson) List? get mediaVersions; String? get libraryId; String? get libraryTitle; String? get audioLanguage;/// Jellyfin playlist entry id used by playlist write endpoints. +@JsonKey(fromJson: _mediaItemRatingsFromJson) List? get ratings; bool? get isFavorite;@JsonKey(fromJson: _mediaItemStringList) List? get genres;@JsonKey(fromJson: _mediaItemStringList) List? get directors;@JsonKey(fromJson: _mediaItemStringList) List? get writers;@JsonKey(fromJson: _mediaItemStringList) List? get producers;@JsonKey(fromJson: _mediaItemStringList) List? get countries;@JsonKey(fromJson: _mediaItemStringList) List? get collections;@JsonKey(fromJson: _mediaItemStringList) List? get labels;@JsonKey(fromJson: _mediaItemStringList) List? get styles;@JsonKey(fromJson: _mediaItemStringList) List? get moods;@JsonKey(fromJson: _mediaItemRolesFromJson) List? get roles;@JsonKey(fromJson: _mediaItemVersionsFromJson) List? get mediaVersions; String? get libraryId; String? get libraryTitle;/// Jellyfin playlist entry id used by playlist write endpoints. @JsonKey(fromJson: flexibleInt) Object? get playlistItemId; String? get serverId; String? get serverName;/// Relative folder key (`/library/sections/{id}/folder?parent=…`) for /// [MediaKind.folder] rows — what [MediaServerClient.fetchFolderChildren] /// tunes into. Stamped by the folder fetchers, null elsewhere. @@ -35,7 +35,7 @@ $MediaItemCopyWith get copyWith => _$MediaItemCopyWithImpl @override String toString() { - return 'MediaItem(id: $id, kind: $kind, guid: $guid, title: $title, titleSort: $titleSort, summary: $summary, tagline: $tagline, originalTitle: $originalTitle, studio: $studio, year: $year, originallyAvailableAt: $originallyAvailableAt, contentRating: $contentRating, parentId: $parentId, parentTitle: $parentTitle, parentThumbPath: $parentThumbPath, parentIndex: $parentIndex, index: $index, grandparentId: $grandparentId, grandparentTitle: $grandparentTitle, grandparentThumbPath: $grandparentThumbPath, grandparentArtPath: $grandparentArtPath, grandparentBackdropPaths: $grandparentBackdropPaths, thumbPath: $thumbPath, artPath: $artPath, backdropPaths: $backdropPaths, clearLogoPath: $clearLogoPath, backgroundSquarePath: $backgroundSquarePath, durationMs: $durationMs, viewOffsetMs: $viewOffsetMs, viewCount: $viewCount, lastViewedAt: $lastViewedAt, leafCount: $leafCount, viewedLeafCount: $viewedLeafCount, childCount: $childCount, addedAt: $addedAt, updatedAt: $updatedAt, rating: $rating, userRating: $userRating, ratings: $ratings, isFavorite: $isFavorite, genres: $genres, directors: $directors, writers: $writers, producers: $producers, countries: $countries, collections: $collections, labels: $labels, styles: $styles, moods: $moods, roles: $roles, mediaVersions: $mediaVersions, libraryId: $libraryId, libraryTitle: $libraryTitle, audioLanguage: $audioLanguage, playlistItemId: $playlistItemId, serverId: $serverId, serverName: $serverName, backendFolderKey: $backendFolderKey, raw: $raw)'; + return 'MediaItem(id: $id, kind: $kind, guid: $guid, title: $title, titleSort: $titleSort, summary: $summary, tagline: $tagline, originalTitle: $originalTitle, studio: $studio, year: $year, originallyAvailableAt: $originallyAvailableAt, contentRating: $contentRating, parentId: $parentId, parentTitle: $parentTitle, parentThumbPath: $parentThumbPath, parentIndex: $parentIndex, index: $index, grandparentId: $grandparentId, grandparentTitle: $grandparentTitle, grandparentThumbPath: $grandparentThumbPath, grandparentArtPath: $grandparentArtPath, grandparentBackdropPaths: $grandparentBackdropPaths, thumbPath: $thumbPath, artPath: $artPath, backdropPaths: $backdropPaths, clearLogoPath: $clearLogoPath, backgroundSquarePath: $backgroundSquarePath, durationMs: $durationMs, viewOffsetMs: $viewOffsetMs, viewCount: $viewCount, lastViewedAt: $lastViewedAt, leafCount: $leafCount, viewedLeafCount: $viewedLeafCount, childCount: $childCount, addedAt: $addedAt, updatedAt: $updatedAt, rating: $rating, userRating: $userRating, ratings: $ratings, isFavorite: $isFavorite, genres: $genres, directors: $directors, writers: $writers, producers: $producers, countries: $countries, collections: $collections, labels: $labels, styles: $styles, moods: $moods, roles: $roles, mediaVersions: $mediaVersions, libraryId: $libraryId, libraryTitle: $libraryTitle, playlistItemId: $playlistItemId, serverId: $serverId, serverName: $serverName, backendFolderKey: $backendFolderKey, raw: $raw)'; } @@ -46,7 +46,7 @@ abstract mixin class $MediaItemCopyWith<$Res> { factory $MediaItemCopyWith(MediaItem value, $Res Function(MediaItem) _then) = _$MediaItemCopyWithImpl; @useResult $Res call({ -@JsonKey(readValue: readStringField, defaultValue: '') String id,@JsonKey(fromJson: _mediaKindFromJson, toJson: _mediaKindToJson) MediaKind kind, String? guid, String? title, String? titleSort, String? summary, String? tagline, String? originalTitle, String? studio,@JsonKey(fromJson: flexibleInt) int? year, String? originallyAvailableAt, String? contentRating, String? parentId, String? parentTitle, String? parentThumbPath,@JsonKey(fromJson: flexibleInt) int? parentIndex,@JsonKey(fromJson: flexibleInt) int? index, String? grandparentId, String? grandparentTitle, String? grandparentThumbPath, String? grandparentArtPath, List? grandparentBackdropPaths, String? thumbPath, String? artPath, List? backdropPaths, String? clearLogoPath, String? backgroundSquarePath,@JsonKey(fromJson: flexibleInt) int? durationMs,@JsonKey(fromJson: flexibleInt) int? viewOffsetMs,@JsonKey(fromJson: flexibleInt) int? viewCount,@JsonKey(fromJson: flexibleInt) int? lastViewedAt,@JsonKey(fromJson: flexibleInt) int? leafCount,@JsonKey(fromJson: flexibleInt) int? viewedLeafCount,@JsonKey(fromJson: flexibleInt) int? childCount,@JsonKey(fromJson: flexibleInt) int? addedAt,@JsonKey(fromJson: flexibleInt) int? updatedAt,@JsonKey(fromJson: flexibleDouble) double? rating,@JsonKey(fromJson: flexibleDouble) double? userRating,@JsonKey(fromJson: _mediaItemRatingsFromJson) List? ratings, bool? isFavorite,@JsonKey(fromJson: _mediaItemStringList) List? genres,@JsonKey(fromJson: _mediaItemStringList) List? directors,@JsonKey(fromJson: _mediaItemStringList) List? writers,@JsonKey(fromJson: _mediaItemStringList) List? producers,@JsonKey(fromJson: _mediaItemStringList) List? countries,@JsonKey(fromJson: _mediaItemStringList) List? collections,@JsonKey(fromJson: _mediaItemStringList) List? labels,@JsonKey(fromJson: _mediaItemStringList) List? styles,@JsonKey(fromJson: _mediaItemStringList) List? moods,@JsonKey(fromJson: _mediaItemRolesFromJson) List? roles,@JsonKey(fromJson: _mediaItemVersionsFromJson) List? mediaVersions, String? libraryId, String? libraryTitle, String? audioLanguage, String? serverId, String? serverName, String? backendFolderKey,@JsonKey(fromJson: _mediaItemRawFromJson) Map? raw +@JsonKey(readValue: readStringField, defaultValue: '') String id,@JsonKey(fromJson: _mediaKindFromJson, toJson: _mediaKindToJson) MediaKind kind, String? guid, String? title, String? titleSort, String? summary, String? tagline, String? originalTitle, String? studio,@JsonKey(fromJson: flexibleInt) int? year, String? originallyAvailableAt, String? contentRating, String? parentId, String? parentTitle, String? parentThumbPath,@JsonKey(fromJson: flexibleInt) int? parentIndex,@JsonKey(fromJson: flexibleInt) int? index, String? grandparentId, String? grandparentTitle, String? grandparentThumbPath, String? grandparentArtPath, List? grandparentBackdropPaths, String? thumbPath, String? artPath, List? backdropPaths, String? clearLogoPath, String? backgroundSquarePath,@JsonKey(fromJson: flexibleInt) int? durationMs,@JsonKey(fromJson: flexibleInt) int? viewOffsetMs,@JsonKey(fromJson: flexibleInt) int? viewCount,@JsonKey(fromJson: flexibleInt) int? lastViewedAt,@JsonKey(fromJson: flexibleInt) int? leafCount,@JsonKey(fromJson: flexibleInt) int? viewedLeafCount,@JsonKey(fromJson: flexibleInt) int? childCount,@JsonKey(fromJson: flexibleInt) int? addedAt,@JsonKey(fromJson: flexibleInt) int? updatedAt,@JsonKey(fromJson: flexibleDouble) double? rating,@JsonKey(fromJson: flexibleDouble) double? userRating,@JsonKey(fromJson: _mediaItemRatingsFromJson) List? ratings, bool? isFavorite,@JsonKey(fromJson: _mediaItemStringList) List? genres,@JsonKey(fromJson: _mediaItemStringList) List? directors,@JsonKey(fromJson: _mediaItemStringList) List? writers,@JsonKey(fromJson: _mediaItemStringList) List? producers,@JsonKey(fromJson: _mediaItemStringList) List? countries,@JsonKey(fromJson: _mediaItemStringList) List? collections,@JsonKey(fromJson: _mediaItemStringList) List? labels,@JsonKey(fromJson: _mediaItemStringList) List? styles,@JsonKey(fromJson: _mediaItemStringList) List? moods,@JsonKey(fromJson: _mediaItemRolesFromJson) List? roles,@JsonKey(fromJson: _mediaItemVersionsFromJson) List? mediaVersions, String? libraryId, String? libraryTitle, String? serverId, String? serverName, String? backendFolderKey,@JsonKey(fromJson: _mediaItemRawFromJson) Map? raw }); @@ -63,7 +63,7 @@ class _$MediaItemCopyWithImpl<$Res> /// Create a copy of MediaItem /// with the given fields replaced by the non-null parameter values. -@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? kind = null,Object? guid = freezed,Object? title = freezed,Object? titleSort = freezed,Object? summary = freezed,Object? tagline = freezed,Object? originalTitle = freezed,Object? studio = freezed,Object? year = freezed,Object? originallyAvailableAt = freezed,Object? contentRating = freezed,Object? parentId = freezed,Object? parentTitle = freezed,Object? parentThumbPath = freezed,Object? parentIndex = freezed,Object? index = freezed,Object? grandparentId = freezed,Object? grandparentTitle = freezed,Object? grandparentThumbPath = freezed,Object? grandparentArtPath = freezed,Object? grandparentBackdropPaths = freezed,Object? thumbPath = freezed,Object? artPath = freezed,Object? backdropPaths = freezed,Object? clearLogoPath = freezed,Object? backgroundSquarePath = freezed,Object? durationMs = freezed,Object? viewOffsetMs = freezed,Object? viewCount = freezed,Object? lastViewedAt = freezed,Object? leafCount = freezed,Object? viewedLeafCount = freezed,Object? childCount = freezed,Object? addedAt = freezed,Object? updatedAt = freezed,Object? rating = freezed,Object? userRating = freezed,Object? ratings = freezed,Object? isFavorite = freezed,Object? genres = freezed,Object? directors = freezed,Object? writers = freezed,Object? producers = freezed,Object? countries = freezed,Object? collections = freezed,Object? labels = freezed,Object? styles = freezed,Object? moods = freezed,Object? roles = freezed,Object? mediaVersions = freezed,Object? libraryId = freezed,Object? libraryTitle = freezed,Object? audioLanguage = freezed,Object? serverId = freezed,Object? serverName = freezed,Object? backendFolderKey = freezed,Object? raw = freezed,}) { +@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? kind = null,Object? guid = freezed,Object? title = freezed,Object? titleSort = freezed,Object? summary = freezed,Object? tagline = freezed,Object? originalTitle = freezed,Object? studio = freezed,Object? year = freezed,Object? originallyAvailableAt = freezed,Object? contentRating = freezed,Object? parentId = freezed,Object? parentTitle = freezed,Object? parentThumbPath = freezed,Object? parentIndex = freezed,Object? index = freezed,Object? grandparentId = freezed,Object? grandparentTitle = freezed,Object? grandparentThumbPath = freezed,Object? grandparentArtPath = freezed,Object? grandparentBackdropPaths = freezed,Object? thumbPath = freezed,Object? artPath = freezed,Object? backdropPaths = freezed,Object? clearLogoPath = freezed,Object? backgroundSquarePath = freezed,Object? durationMs = freezed,Object? viewOffsetMs = freezed,Object? viewCount = freezed,Object? lastViewedAt = freezed,Object? leafCount = freezed,Object? viewedLeafCount = freezed,Object? childCount = freezed,Object? addedAt = freezed,Object? updatedAt = freezed,Object? rating = freezed,Object? userRating = freezed,Object? ratings = freezed,Object? isFavorite = freezed,Object? genres = freezed,Object? directors = freezed,Object? writers = freezed,Object? producers = freezed,Object? countries = freezed,Object? collections = freezed,Object? labels = freezed,Object? styles = freezed,Object? moods = freezed,Object? roles = freezed,Object? mediaVersions = freezed,Object? libraryId = freezed,Object? libraryTitle = freezed,Object? serverId = freezed,Object? serverName = freezed,Object? backendFolderKey = freezed,Object? raw = freezed,}) { return _then(_self.copyWith( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,kind: null == kind ? _self.kind : kind // ignore: cast_nullable_to_non_nullable @@ -118,7 +118,6 @@ as List?,roles: freezed == roles ? _self.roles : roles // ignore: cast_n as List?,mediaVersions: freezed == mediaVersions ? _self.mediaVersions : mediaVersions // ignore: cast_nullable_to_non_nullable as List?,libraryId: freezed == libraryId ? _self.libraryId : libraryId // ignore: cast_nullable_to_non_nullable as String?,libraryTitle: freezed == libraryTitle ? _self.libraryTitle : libraryTitle // ignore: cast_nullable_to_non_nullable -as String?,audioLanguage: freezed == audioLanguage ? _self.audioLanguage : audioLanguage // ignore: cast_nullable_to_non_nullable as String?,serverId: freezed == serverId ? _self.serverId : serverId // ignore: cast_nullable_to_non_nullable as String?,serverName: freezed == serverName ? _self.serverName : serverName // ignore: cast_nullable_to_non_nullable as String?,backendFolderKey: freezed == backendFolderKey ? _self.backendFolderKey : backendFolderKey // ignore: cast_nullable_to_non_nullable @@ -208,11 +207,11 @@ return jellyfin(_that);case _: /// } /// ``` -@optionalTypeArgs TResult maybeWhen({TResult Function(@JsonKey(readValue: readStringField, defaultValue: '') String id, @JsonKey(fromJson: _mediaKindFromJson, toJson: _mediaKindToJson) MediaKind kind, String? guid, String? title, String? titleSort, String? summary, String? tagline, String? originalTitle, String? editionTitle, String? studio, @JsonKey(fromJson: flexibleInt) int? year, String? originallyAvailableAt, String? contentRating, String? parentId, String? parentTitle, String? parentThumbPath, @JsonKey(fromJson: flexibleInt) int? parentIndex, @JsonKey(fromJson: flexibleInt) int? index, String? grandparentId, String? grandparentTitle, String? grandparentThumbPath, String? grandparentArtPath, List? grandparentBackdropPaths, String? thumbPath, String? artPath, List? backdropPaths, String? clearLogoPath, String? backgroundSquarePath, @JsonKey(fromJson: flexibleInt) int? durationMs, @JsonKey(fromJson: flexibleInt) int? viewOffsetMs, @JsonKey(fromJson: flexibleInt) int? viewCount, @JsonKey(fromJson: flexibleInt) int? lastViewedAt, @JsonKey(fromJson: flexibleInt) int? leafCount, @JsonKey(fromJson: flexibleInt) int? viewedLeafCount, @JsonKey(fromJson: flexibleInt) int? childCount, @JsonKey(fromJson: flexibleInt) int? addedAt, @JsonKey(fromJson: flexibleInt) int? updatedAt, @JsonKey(fromJson: flexibleDouble) double? rating, @JsonKey(fromJson: flexibleDouble) double? userRating, @JsonKey(fromJson: _mediaItemRatingsFromJson) List? ratings, bool? isFavorite, @JsonKey(fromJson: _mediaItemStringList) List? genres, @JsonKey(fromJson: _mediaItemStringList) List? directors, @JsonKey(fromJson: _mediaItemStringList) List? writers, @JsonKey(fromJson: _mediaItemStringList) List? producers, @JsonKey(fromJson: _mediaItemStringList) List? countries, @JsonKey(fromJson: _mediaItemStringList) List? collections, @JsonKey(fromJson: _mediaItemStringList) List? labels, @JsonKey(fromJson: _mediaItemStringList) List? styles, @JsonKey(fromJson: _mediaItemStringList) List? moods, @JsonKey(fromJson: _mediaItemRolesFromJson) List? roles, @JsonKey(fromJson: _mediaItemVersionsFromJson) List? mediaVersions, String? libraryId, String? libraryTitle, String? audioLanguage, String? subtitleLanguage, String? trailerKey, @JsonKey(fromJson: flexibleInt) int? playlistItemId, @JsonKey(fromJson: flexibleInt) int? playQueueItemId, String? subtype, String? serverId, String? serverName, String? backendFolderKey, @JsonKey(fromJson: _mediaItemRawFromJson) Map? raw)? plex,TResult Function(@JsonKey(includeToJson: false, includeFromJson: false) MediaBrowserDialect dialect, @JsonKey(readValue: readStringField, defaultValue: '') String id, @JsonKey(fromJson: _mediaKindFromJson, toJson: _mediaKindToJson) MediaKind kind, String? guid, String? title, String? titleSort, String? summary, String? tagline, String? originalTitle, String? studio, @JsonKey(fromJson: flexibleInt) int? year, String? originallyAvailableAt, String? contentRating, String? parentId, String? parentTitle, String? parentThumbPath, @JsonKey(fromJson: flexibleInt) int? parentIndex, @JsonKey(fromJson: flexibleInt) int? index, String? grandparentId, String? grandparentTitle, String? grandparentThumbPath, String? grandparentArtPath, List? grandparentBackdropPaths, String? thumbPath, String? artPath, List? backdropPaths, String? clearLogoPath, String? backgroundSquarePath, @JsonKey(fromJson: flexibleInt) int? durationMs, @JsonKey(fromJson: flexibleInt) int? viewOffsetMs, @JsonKey(fromJson: flexibleInt) int? viewCount, @JsonKey(fromJson: flexibleInt) int? lastViewedAt, @JsonKey(fromJson: flexibleInt) int? leafCount, @JsonKey(fromJson: flexibleInt) int? viewedLeafCount, @JsonKey(fromJson: flexibleInt) int? childCount, @JsonKey(fromJson: flexibleInt) int? addedAt, @JsonKey(fromJson: flexibleInt) int? updatedAt, @JsonKey(fromJson: flexibleDouble) double? rating, @JsonKey(fromJson: flexibleDouble) double? userRating, @JsonKey(fromJson: _mediaItemRatingsFromJson) List? ratings, bool? isFavorite, @JsonKey(fromJson: _mediaItemStringList) List? genres, @JsonKey(fromJson: _mediaItemStringList) List? directors, @JsonKey(fromJson: _mediaItemStringList) List? writers, @JsonKey(fromJson: _mediaItemStringList) List? producers, @JsonKey(fromJson: _mediaItemStringList) List? countries, @JsonKey(fromJson: _mediaItemStringList) List? collections, @JsonKey(fromJson: _mediaItemStringList) List? labels, @JsonKey(fromJson: _mediaItemStringList) List? styles, @JsonKey(fromJson: _mediaItemStringList) List? moods, @JsonKey(fromJson: _mediaItemRolesFromJson) List? roles, @JsonKey(fromJson: _mediaItemVersionsFromJson) List? mediaVersions, String? libraryId, String? libraryTitle, String? audioLanguage, String? playlistItemId, String? serverId, String? serverName, String? backendFolderKey, @JsonKey(fromJson: _mediaItemRawFromJson) Map? raw)? jellyfin,required TResult orElse(),}) {final _that = this; +@optionalTypeArgs TResult maybeWhen({TResult Function(@JsonKey(readValue: readStringField, defaultValue: '') String id, @JsonKey(fromJson: _mediaKindFromJson, toJson: _mediaKindToJson) MediaKind kind, String? guid, String? title, String? titleSort, String? summary, String? tagline, String? originalTitle, String? editionTitle, String? studio, @JsonKey(fromJson: flexibleInt) int? year, String? originallyAvailableAt, String? contentRating, String? parentId, String? parentTitle, String? parentThumbPath, @JsonKey(fromJson: flexibleInt) int? parentIndex, @JsonKey(fromJson: flexibleInt) int? index, String? grandparentId, String? grandparentTitle, String? grandparentThumbPath, String? grandparentArtPath, List? grandparentBackdropPaths, String? thumbPath, String? artPath, List? backdropPaths, String? clearLogoPath, String? backgroundSquarePath, @JsonKey(fromJson: flexibleInt) int? durationMs, @JsonKey(fromJson: flexibleInt) int? viewOffsetMs, @JsonKey(fromJson: flexibleInt) int? viewCount, @JsonKey(fromJson: flexibleInt) int? lastViewedAt, @JsonKey(fromJson: flexibleInt) int? leafCount, @JsonKey(fromJson: flexibleInt) int? viewedLeafCount, @JsonKey(fromJson: flexibleInt) int? childCount, @JsonKey(fromJson: flexibleInt) int? addedAt, @JsonKey(fromJson: flexibleInt) int? updatedAt, @JsonKey(fromJson: flexibleDouble) double? rating, @JsonKey(fromJson: flexibleDouble) double? userRating, @JsonKey(fromJson: _mediaItemRatingsFromJson) List? ratings, bool? isFavorite, @JsonKey(fromJson: _mediaItemStringList) List? genres, @JsonKey(fromJson: _mediaItemStringList) List? directors, @JsonKey(fromJson: _mediaItemStringList) List? writers, @JsonKey(fromJson: _mediaItemStringList) List? producers, @JsonKey(fromJson: _mediaItemStringList) List? countries, @JsonKey(fromJson: _mediaItemStringList) List? collections, @JsonKey(fromJson: _mediaItemStringList) List? labels, @JsonKey(fromJson: _mediaItemStringList) List? styles, @JsonKey(fromJson: _mediaItemStringList) List? moods, @JsonKey(fromJson: _mediaItemRolesFromJson) List? roles, @JsonKey(fromJson: _mediaItemVersionsFromJson) List? mediaVersions, String? libraryId, String? libraryTitle, String? trailerKey, @JsonKey(fromJson: flexibleInt) int? playlistItemId, @JsonKey(fromJson: flexibleInt) int? playQueueItemId, String? subtype, String? serverId, String? serverName, String? backendFolderKey, @JsonKey(fromJson: _mediaItemRawFromJson) Map? raw)? plex,TResult Function(@JsonKey(includeToJson: false, includeFromJson: false) MediaBrowserDialect dialect, @JsonKey(readValue: readStringField, defaultValue: '') String id, @JsonKey(fromJson: _mediaKindFromJson, toJson: _mediaKindToJson) MediaKind kind, String? guid, String? title, String? titleSort, String? summary, String? tagline, String? originalTitle, String? studio, @JsonKey(fromJson: flexibleInt) int? year, String? originallyAvailableAt, String? contentRating, String? parentId, String? parentTitle, String? parentThumbPath, @JsonKey(fromJson: flexibleInt) int? parentIndex, @JsonKey(fromJson: flexibleInt) int? index, String? grandparentId, String? grandparentTitle, String? grandparentThumbPath, String? grandparentArtPath, List? grandparentBackdropPaths, String? thumbPath, String? artPath, List? backdropPaths, String? clearLogoPath, String? backgroundSquarePath, @JsonKey(fromJson: flexibleInt) int? durationMs, @JsonKey(fromJson: flexibleInt) int? viewOffsetMs, @JsonKey(fromJson: flexibleInt) int? viewCount, @JsonKey(fromJson: flexibleInt) int? lastViewedAt, @JsonKey(fromJson: flexibleInt) int? leafCount, @JsonKey(fromJson: flexibleInt) int? viewedLeafCount, @JsonKey(fromJson: flexibleInt) int? childCount, @JsonKey(fromJson: flexibleInt) int? addedAt, @JsonKey(fromJson: flexibleInt) int? updatedAt, @JsonKey(fromJson: flexibleDouble) double? rating, @JsonKey(fromJson: flexibleDouble) double? userRating, @JsonKey(fromJson: _mediaItemRatingsFromJson) List? ratings, bool? isFavorite, @JsonKey(fromJson: _mediaItemStringList) List? genres, @JsonKey(fromJson: _mediaItemStringList) List? directors, @JsonKey(fromJson: _mediaItemStringList) List? writers, @JsonKey(fromJson: _mediaItemStringList) List? producers, @JsonKey(fromJson: _mediaItemStringList) List? countries, @JsonKey(fromJson: _mediaItemStringList) List? collections, @JsonKey(fromJson: _mediaItemStringList) List? labels, @JsonKey(fromJson: _mediaItemStringList) List? styles, @JsonKey(fromJson: _mediaItemStringList) List? moods, @JsonKey(fromJson: _mediaItemRolesFromJson) List? roles, @JsonKey(fromJson: _mediaItemVersionsFromJson) List? mediaVersions, String? libraryId, String? libraryTitle, String? playlistItemId, String? serverId, String? serverName, String? backendFolderKey, @JsonKey(fromJson: _mediaItemRawFromJson) Map? raw)? jellyfin,required TResult orElse(),}) {final _that = this; switch (_that) { case PlexMediaItem() when plex != null: -return plex(_that.id,_that.kind,_that.guid,_that.title,_that.titleSort,_that.summary,_that.tagline,_that.originalTitle,_that.editionTitle,_that.studio,_that.year,_that.originallyAvailableAt,_that.contentRating,_that.parentId,_that.parentTitle,_that.parentThumbPath,_that.parentIndex,_that.index,_that.grandparentId,_that.grandparentTitle,_that.grandparentThumbPath,_that.grandparentArtPath,_that.grandparentBackdropPaths,_that.thumbPath,_that.artPath,_that.backdropPaths,_that.clearLogoPath,_that.backgroundSquarePath,_that.durationMs,_that.viewOffsetMs,_that.viewCount,_that.lastViewedAt,_that.leafCount,_that.viewedLeafCount,_that.childCount,_that.addedAt,_that.updatedAt,_that.rating,_that.userRating,_that.ratings,_that.isFavorite,_that.genres,_that.directors,_that.writers,_that.producers,_that.countries,_that.collections,_that.labels,_that.styles,_that.moods,_that.roles,_that.mediaVersions,_that.libraryId,_that.libraryTitle,_that.audioLanguage,_that.subtitleLanguage,_that.trailerKey,_that.playlistItemId,_that.playQueueItemId,_that.subtype,_that.serverId,_that.serverName,_that.backendFolderKey,_that.raw);case JellyfinMediaItem() when jellyfin != null: -return jellyfin(_that.dialect,_that.id,_that.kind,_that.guid,_that.title,_that.titleSort,_that.summary,_that.tagline,_that.originalTitle,_that.studio,_that.year,_that.originallyAvailableAt,_that.contentRating,_that.parentId,_that.parentTitle,_that.parentThumbPath,_that.parentIndex,_that.index,_that.grandparentId,_that.grandparentTitle,_that.grandparentThumbPath,_that.grandparentArtPath,_that.grandparentBackdropPaths,_that.thumbPath,_that.artPath,_that.backdropPaths,_that.clearLogoPath,_that.backgroundSquarePath,_that.durationMs,_that.viewOffsetMs,_that.viewCount,_that.lastViewedAt,_that.leafCount,_that.viewedLeafCount,_that.childCount,_that.addedAt,_that.updatedAt,_that.rating,_that.userRating,_that.ratings,_that.isFavorite,_that.genres,_that.directors,_that.writers,_that.producers,_that.countries,_that.collections,_that.labels,_that.styles,_that.moods,_that.roles,_that.mediaVersions,_that.libraryId,_that.libraryTitle,_that.audioLanguage,_that.playlistItemId,_that.serverId,_that.serverName,_that.backendFolderKey,_that.raw);case _: +return plex(_that.id,_that.kind,_that.guid,_that.title,_that.titleSort,_that.summary,_that.tagline,_that.originalTitle,_that.editionTitle,_that.studio,_that.year,_that.originallyAvailableAt,_that.contentRating,_that.parentId,_that.parentTitle,_that.parentThumbPath,_that.parentIndex,_that.index,_that.grandparentId,_that.grandparentTitle,_that.grandparentThumbPath,_that.grandparentArtPath,_that.grandparentBackdropPaths,_that.thumbPath,_that.artPath,_that.backdropPaths,_that.clearLogoPath,_that.backgroundSquarePath,_that.durationMs,_that.viewOffsetMs,_that.viewCount,_that.lastViewedAt,_that.leafCount,_that.viewedLeafCount,_that.childCount,_that.addedAt,_that.updatedAt,_that.rating,_that.userRating,_that.ratings,_that.isFavorite,_that.genres,_that.directors,_that.writers,_that.producers,_that.countries,_that.collections,_that.labels,_that.styles,_that.moods,_that.roles,_that.mediaVersions,_that.libraryId,_that.libraryTitle,_that.trailerKey,_that.playlistItemId,_that.playQueueItemId,_that.subtype,_that.serverId,_that.serverName,_that.backendFolderKey,_that.raw);case JellyfinMediaItem() when jellyfin != null: +return jellyfin(_that.dialect,_that.id,_that.kind,_that.guid,_that.title,_that.titleSort,_that.summary,_that.tagline,_that.originalTitle,_that.studio,_that.year,_that.originallyAvailableAt,_that.contentRating,_that.parentId,_that.parentTitle,_that.parentThumbPath,_that.parentIndex,_that.index,_that.grandparentId,_that.grandparentTitle,_that.grandparentThumbPath,_that.grandparentArtPath,_that.grandparentBackdropPaths,_that.thumbPath,_that.artPath,_that.backdropPaths,_that.clearLogoPath,_that.backgroundSquarePath,_that.durationMs,_that.viewOffsetMs,_that.viewCount,_that.lastViewedAt,_that.leafCount,_that.viewedLeafCount,_that.childCount,_that.addedAt,_that.updatedAt,_that.rating,_that.userRating,_that.ratings,_that.isFavorite,_that.genres,_that.directors,_that.writers,_that.producers,_that.countries,_that.collections,_that.labels,_that.styles,_that.moods,_that.roles,_that.mediaVersions,_that.libraryId,_that.libraryTitle,_that.playlistItemId,_that.serverId,_that.serverName,_that.backendFolderKey,_that.raw);case _: return orElse(); } @@ -230,11 +229,11 @@ return jellyfin(_that.dialect,_that.id,_that.kind,_that.guid,_that.title,_that.t /// } /// ``` -@optionalTypeArgs TResult when({required TResult Function(@JsonKey(readValue: readStringField, defaultValue: '') String id, @JsonKey(fromJson: _mediaKindFromJson, toJson: _mediaKindToJson) MediaKind kind, String? guid, String? title, String? titleSort, String? summary, String? tagline, String? originalTitle, String? editionTitle, String? studio, @JsonKey(fromJson: flexibleInt) int? year, String? originallyAvailableAt, String? contentRating, String? parentId, String? parentTitle, String? parentThumbPath, @JsonKey(fromJson: flexibleInt) int? parentIndex, @JsonKey(fromJson: flexibleInt) int? index, String? grandparentId, String? grandparentTitle, String? grandparentThumbPath, String? grandparentArtPath, List? grandparentBackdropPaths, String? thumbPath, String? artPath, List? backdropPaths, String? clearLogoPath, String? backgroundSquarePath, @JsonKey(fromJson: flexibleInt) int? durationMs, @JsonKey(fromJson: flexibleInt) int? viewOffsetMs, @JsonKey(fromJson: flexibleInt) int? viewCount, @JsonKey(fromJson: flexibleInt) int? lastViewedAt, @JsonKey(fromJson: flexibleInt) int? leafCount, @JsonKey(fromJson: flexibleInt) int? viewedLeafCount, @JsonKey(fromJson: flexibleInt) int? childCount, @JsonKey(fromJson: flexibleInt) int? addedAt, @JsonKey(fromJson: flexibleInt) int? updatedAt, @JsonKey(fromJson: flexibleDouble) double? rating, @JsonKey(fromJson: flexibleDouble) double? userRating, @JsonKey(fromJson: _mediaItemRatingsFromJson) List? ratings, bool? isFavorite, @JsonKey(fromJson: _mediaItemStringList) List? genres, @JsonKey(fromJson: _mediaItemStringList) List? directors, @JsonKey(fromJson: _mediaItemStringList) List? writers, @JsonKey(fromJson: _mediaItemStringList) List? producers, @JsonKey(fromJson: _mediaItemStringList) List? countries, @JsonKey(fromJson: _mediaItemStringList) List? collections, @JsonKey(fromJson: _mediaItemStringList) List? labels, @JsonKey(fromJson: _mediaItemStringList) List? styles, @JsonKey(fromJson: _mediaItemStringList) List? moods, @JsonKey(fromJson: _mediaItemRolesFromJson) List? roles, @JsonKey(fromJson: _mediaItemVersionsFromJson) List? mediaVersions, String? libraryId, String? libraryTitle, String? audioLanguage, String? subtitleLanguage, String? trailerKey, @JsonKey(fromJson: flexibleInt) int? playlistItemId, @JsonKey(fromJson: flexibleInt) int? playQueueItemId, String? subtype, String? serverId, String? serverName, String? backendFolderKey, @JsonKey(fromJson: _mediaItemRawFromJson) Map? raw) plex,required TResult Function(@JsonKey(includeToJson: false, includeFromJson: false) MediaBrowserDialect dialect, @JsonKey(readValue: readStringField, defaultValue: '') String id, @JsonKey(fromJson: _mediaKindFromJson, toJson: _mediaKindToJson) MediaKind kind, String? guid, String? title, String? titleSort, String? summary, String? tagline, String? originalTitle, String? studio, @JsonKey(fromJson: flexibleInt) int? year, String? originallyAvailableAt, String? contentRating, String? parentId, String? parentTitle, String? parentThumbPath, @JsonKey(fromJson: flexibleInt) int? parentIndex, @JsonKey(fromJson: flexibleInt) int? index, String? grandparentId, String? grandparentTitle, String? grandparentThumbPath, String? grandparentArtPath, List? grandparentBackdropPaths, String? thumbPath, String? artPath, List? backdropPaths, String? clearLogoPath, String? backgroundSquarePath, @JsonKey(fromJson: flexibleInt) int? durationMs, @JsonKey(fromJson: flexibleInt) int? viewOffsetMs, @JsonKey(fromJson: flexibleInt) int? viewCount, @JsonKey(fromJson: flexibleInt) int? lastViewedAt, @JsonKey(fromJson: flexibleInt) int? leafCount, @JsonKey(fromJson: flexibleInt) int? viewedLeafCount, @JsonKey(fromJson: flexibleInt) int? childCount, @JsonKey(fromJson: flexibleInt) int? addedAt, @JsonKey(fromJson: flexibleInt) int? updatedAt, @JsonKey(fromJson: flexibleDouble) double? rating, @JsonKey(fromJson: flexibleDouble) double? userRating, @JsonKey(fromJson: _mediaItemRatingsFromJson) List? ratings, bool? isFavorite, @JsonKey(fromJson: _mediaItemStringList) List? genres, @JsonKey(fromJson: _mediaItemStringList) List? directors, @JsonKey(fromJson: _mediaItemStringList) List? writers, @JsonKey(fromJson: _mediaItemStringList) List? producers, @JsonKey(fromJson: _mediaItemStringList) List? countries, @JsonKey(fromJson: _mediaItemStringList) List? collections, @JsonKey(fromJson: _mediaItemStringList) List? labels, @JsonKey(fromJson: _mediaItemStringList) List? styles, @JsonKey(fromJson: _mediaItemStringList) List? moods, @JsonKey(fromJson: _mediaItemRolesFromJson) List? roles, @JsonKey(fromJson: _mediaItemVersionsFromJson) List? mediaVersions, String? libraryId, String? libraryTitle, String? audioLanguage, String? playlistItemId, String? serverId, String? serverName, String? backendFolderKey, @JsonKey(fromJson: _mediaItemRawFromJson) Map? raw) jellyfin,}) {final _that = this; +@optionalTypeArgs TResult when({required TResult Function(@JsonKey(readValue: readStringField, defaultValue: '') String id, @JsonKey(fromJson: _mediaKindFromJson, toJson: _mediaKindToJson) MediaKind kind, String? guid, String? title, String? titleSort, String? summary, String? tagline, String? originalTitle, String? editionTitle, String? studio, @JsonKey(fromJson: flexibleInt) int? year, String? originallyAvailableAt, String? contentRating, String? parentId, String? parentTitle, String? parentThumbPath, @JsonKey(fromJson: flexibleInt) int? parentIndex, @JsonKey(fromJson: flexibleInt) int? index, String? grandparentId, String? grandparentTitle, String? grandparentThumbPath, String? grandparentArtPath, List? grandparentBackdropPaths, String? thumbPath, String? artPath, List? backdropPaths, String? clearLogoPath, String? backgroundSquarePath, @JsonKey(fromJson: flexibleInt) int? durationMs, @JsonKey(fromJson: flexibleInt) int? viewOffsetMs, @JsonKey(fromJson: flexibleInt) int? viewCount, @JsonKey(fromJson: flexibleInt) int? lastViewedAt, @JsonKey(fromJson: flexibleInt) int? leafCount, @JsonKey(fromJson: flexibleInt) int? viewedLeafCount, @JsonKey(fromJson: flexibleInt) int? childCount, @JsonKey(fromJson: flexibleInt) int? addedAt, @JsonKey(fromJson: flexibleInt) int? updatedAt, @JsonKey(fromJson: flexibleDouble) double? rating, @JsonKey(fromJson: flexibleDouble) double? userRating, @JsonKey(fromJson: _mediaItemRatingsFromJson) List? ratings, bool? isFavorite, @JsonKey(fromJson: _mediaItemStringList) List? genres, @JsonKey(fromJson: _mediaItemStringList) List? directors, @JsonKey(fromJson: _mediaItemStringList) List? writers, @JsonKey(fromJson: _mediaItemStringList) List? producers, @JsonKey(fromJson: _mediaItemStringList) List? countries, @JsonKey(fromJson: _mediaItemStringList) List? collections, @JsonKey(fromJson: _mediaItemStringList) List? labels, @JsonKey(fromJson: _mediaItemStringList) List? styles, @JsonKey(fromJson: _mediaItemStringList) List? moods, @JsonKey(fromJson: _mediaItemRolesFromJson) List? roles, @JsonKey(fromJson: _mediaItemVersionsFromJson) List? mediaVersions, String? libraryId, String? libraryTitle, String? trailerKey, @JsonKey(fromJson: flexibleInt) int? playlistItemId, @JsonKey(fromJson: flexibleInt) int? playQueueItemId, String? subtype, String? serverId, String? serverName, String? backendFolderKey, @JsonKey(fromJson: _mediaItemRawFromJson) Map? raw) plex,required TResult Function(@JsonKey(includeToJson: false, includeFromJson: false) MediaBrowserDialect dialect, @JsonKey(readValue: readStringField, defaultValue: '') String id, @JsonKey(fromJson: _mediaKindFromJson, toJson: _mediaKindToJson) MediaKind kind, String? guid, String? title, String? titleSort, String? summary, String? tagline, String? originalTitle, String? studio, @JsonKey(fromJson: flexibleInt) int? year, String? originallyAvailableAt, String? contentRating, String? parentId, String? parentTitle, String? parentThumbPath, @JsonKey(fromJson: flexibleInt) int? parentIndex, @JsonKey(fromJson: flexibleInt) int? index, String? grandparentId, String? grandparentTitle, String? grandparentThumbPath, String? grandparentArtPath, List? grandparentBackdropPaths, String? thumbPath, String? artPath, List? backdropPaths, String? clearLogoPath, String? backgroundSquarePath, @JsonKey(fromJson: flexibleInt) int? durationMs, @JsonKey(fromJson: flexibleInt) int? viewOffsetMs, @JsonKey(fromJson: flexibleInt) int? viewCount, @JsonKey(fromJson: flexibleInt) int? lastViewedAt, @JsonKey(fromJson: flexibleInt) int? leafCount, @JsonKey(fromJson: flexibleInt) int? viewedLeafCount, @JsonKey(fromJson: flexibleInt) int? childCount, @JsonKey(fromJson: flexibleInt) int? addedAt, @JsonKey(fromJson: flexibleInt) int? updatedAt, @JsonKey(fromJson: flexibleDouble) double? rating, @JsonKey(fromJson: flexibleDouble) double? userRating, @JsonKey(fromJson: _mediaItemRatingsFromJson) List? ratings, bool? isFavorite, @JsonKey(fromJson: _mediaItemStringList) List? genres, @JsonKey(fromJson: _mediaItemStringList) List? directors, @JsonKey(fromJson: _mediaItemStringList) List? writers, @JsonKey(fromJson: _mediaItemStringList) List? producers, @JsonKey(fromJson: _mediaItemStringList) List? countries, @JsonKey(fromJson: _mediaItemStringList) List? collections, @JsonKey(fromJson: _mediaItemStringList) List? labels, @JsonKey(fromJson: _mediaItemStringList) List? styles, @JsonKey(fromJson: _mediaItemStringList) List? moods, @JsonKey(fromJson: _mediaItemRolesFromJson) List? roles, @JsonKey(fromJson: _mediaItemVersionsFromJson) List? mediaVersions, String? libraryId, String? libraryTitle, String? playlistItemId, String? serverId, String? serverName, String? backendFolderKey, @JsonKey(fromJson: _mediaItemRawFromJson) Map? raw) jellyfin,}) {final _that = this; switch (_that) { case PlexMediaItem(): -return plex(_that.id,_that.kind,_that.guid,_that.title,_that.titleSort,_that.summary,_that.tagline,_that.originalTitle,_that.editionTitle,_that.studio,_that.year,_that.originallyAvailableAt,_that.contentRating,_that.parentId,_that.parentTitle,_that.parentThumbPath,_that.parentIndex,_that.index,_that.grandparentId,_that.grandparentTitle,_that.grandparentThumbPath,_that.grandparentArtPath,_that.grandparentBackdropPaths,_that.thumbPath,_that.artPath,_that.backdropPaths,_that.clearLogoPath,_that.backgroundSquarePath,_that.durationMs,_that.viewOffsetMs,_that.viewCount,_that.lastViewedAt,_that.leafCount,_that.viewedLeafCount,_that.childCount,_that.addedAt,_that.updatedAt,_that.rating,_that.userRating,_that.ratings,_that.isFavorite,_that.genres,_that.directors,_that.writers,_that.producers,_that.countries,_that.collections,_that.labels,_that.styles,_that.moods,_that.roles,_that.mediaVersions,_that.libraryId,_that.libraryTitle,_that.audioLanguage,_that.subtitleLanguage,_that.trailerKey,_that.playlistItemId,_that.playQueueItemId,_that.subtype,_that.serverId,_that.serverName,_that.backendFolderKey,_that.raw);case JellyfinMediaItem(): -return jellyfin(_that.dialect,_that.id,_that.kind,_that.guid,_that.title,_that.titleSort,_that.summary,_that.tagline,_that.originalTitle,_that.studio,_that.year,_that.originallyAvailableAt,_that.contentRating,_that.parentId,_that.parentTitle,_that.parentThumbPath,_that.parentIndex,_that.index,_that.grandparentId,_that.grandparentTitle,_that.grandparentThumbPath,_that.grandparentArtPath,_that.grandparentBackdropPaths,_that.thumbPath,_that.artPath,_that.backdropPaths,_that.clearLogoPath,_that.backgroundSquarePath,_that.durationMs,_that.viewOffsetMs,_that.viewCount,_that.lastViewedAt,_that.leafCount,_that.viewedLeafCount,_that.childCount,_that.addedAt,_that.updatedAt,_that.rating,_that.userRating,_that.ratings,_that.isFavorite,_that.genres,_that.directors,_that.writers,_that.producers,_that.countries,_that.collections,_that.labels,_that.styles,_that.moods,_that.roles,_that.mediaVersions,_that.libraryId,_that.libraryTitle,_that.audioLanguage,_that.playlistItemId,_that.serverId,_that.serverName,_that.backendFolderKey,_that.raw);} +return plex(_that.id,_that.kind,_that.guid,_that.title,_that.titleSort,_that.summary,_that.tagline,_that.originalTitle,_that.editionTitle,_that.studio,_that.year,_that.originallyAvailableAt,_that.contentRating,_that.parentId,_that.parentTitle,_that.parentThumbPath,_that.parentIndex,_that.index,_that.grandparentId,_that.grandparentTitle,_that.grandparentThumbPath,_that.grandparentArtPath,_that.grandparentBackdropPaths,_that.thumbPath,_that.artPath,_that.backdropPaths,_that.clearLogoPath,_that.backgroundSquarePath,_that.durationMs,_that.viewOffsetMs,_that.viewCount,_that.lastViewedAt,_that.leafCount,_that.viewedLeafCount,_that.childCount,_that.addedAt,_that.updatedAt,_that.rating,_that.userRating,_that.ratings,_that.isFavorite,_that.genres,_that.directors,_that.writers,_that.producers,_that.countries,_that.collections,_that.labels,_that.styles,_that.moods,_that.roles,_that.mediaVersions,_that.libraryId,_that.libraryTitle,_that.trailerKey,_that.playlistItemId,_that.playQueueItemId,_that.subtype,_that.serverId,_that.serverName,_that.backendFolderKey,_that.raw);case JellyfinMediaItem(): +return jellyfin(_that.dialect,_that.id,_that.kind,_that.guid,_that.title,_that.titleSort,_that.summary,_that.tagline,_that.originalTitle,_that.studio,_that.year,_that.originallyAvailableAt,_that.contentRating,_that.parentId,_that.parentTitle,_that.parentThumbPath,_that.parentIndex,_that.index,_that.grandparentId,_that.grandparentTitle,_that.grandparentThumbPath,_that.grandparentArtPath,_that.grandparentBackdropPaths,_that.thumbPath,_that.artPath,_that.backdropPaths,_that.clearLogoPath,_that.backgroundSquarePath,_that.durationMs,_that.viewOffsetMs,_that.viewCount,_that.lastViewedAt,_that.leafCount,_that.viewedLeafCount,_that.childCount,_that.addedAt,_that.updatedAt,_that.rating,_that.userRating,_that.ratings,_that.isFavorite,_that.genres,_that.directors,_that.writers,_that.producers,_that.countries,_that.collections,_that.labels,_that.styles,_that.moods,_that.roles,_that.mediaVersions,_that.libraryId,_that.libraryTitle,_that.playlistItemId,_that.serverId,_that.serverName,_that.backendFolderKey,_that.raw);} } /// A variant of `when` that fallback to returning `null` /// @@ -248,11 +247,11 @@ return jellyfin(_that.dialect,_that.id,_that.kind,_that.guid,_that.title,_that.t /// } /// ``` -@optionalTypeArgs TResult? whenOrNull({TResult? Function(@JsonKey(readValue: readStringField, defaultValue: '') String id, @JsonKey(fromJson: _mediaKindFromJson, toJson: _mediaKindToJson) MediaKind kind, String? guid, String? title, String? titleSort, String? summary, String? tagline, String? originalTitle, String? editionTitle, String? studio, @JsonKey(fromJson: flexibleInt) int? year, String? originallyAvailableAt, String? contentRating, String? parentId, String? parentTitle, String? parentThumbPath, @JsonKey(fromJson: flexibleInt) int? parentIndex, @JsonKey(fromJson: flexibleInt) int? index, String? grandparentId, String? grandparentTitle, String? grandparentThumbPath, String? grandparentArtPath, List? grandparentBackdropPaths, String? thumbPath, String? artPath, List? backdropPaths, String? clearLogoPath, String? backgroundSquarePath, @JsonKey(fromJson: flexibleInt) int? durationMs, @JsonKey(fromJson: flexibleInt) int? viewOffsetMs, @JsonKey(fromJson: flexibleInt) int? viewCount, @JsonKey(fromJson: flexibleInt) int? lastViewedAt, @JsonKey(fromJson: flexibleInt) int? leafCount, @JsonKey(fromJson: flexibleInt) int? viewedLeafCount, @JsonKey(fromJson: flexibleInt) int? childCount, @JsonKey(fromJson: flexibleInt) int? addedAt, @JsonKey(fromJson: flexibleInt) int? updatedAt, @JsonKey(fromJson: flexibleDouble) double? rating, @JsonKey(fromJson: flexibleDouble) double? userRating, @JsonKey(fromJson: _mediaItemRatingsFromJson) List? ratings, bool? isFavorite, @JsonKey(fromJson: _mediaItemStringList) List? genres, @JsonKey(fromJson: _mediaItemStringList) List? directors, @JsonKey(fromJson: _mediaItemStringList) List? writers, @JsonKey(fromJson: _mediaItemStringList) List? producers, @JsonKey(fromJson: _mediaItemStringList) List? countries, @JsonKey(fromJson: _mediaItemStringList) List? collections, @JsonKey(fromJson: _mediaItemStringList) List? labels, @JsonKey(fromJson: _mediaItemStringList) List? styles, @JsonKey(fromJson: _mediaItemStringList) List? moods, @JsonKey(fromJson: _mediaItemRolesFromJson) List? roles, @JsonKey(fromJson: _mediaItemVersionsFromJson) List? mediaVersions, String? libraryId, String? libraryTitle, String? audioLanguage, String? subtitleLanguage, String? trailerKey, @JsonKey(fromJson: flexibleInt) int? playlistItemId, @JsonKey(fromJson: flexibleInt) int? playQueueItemId, String? subtype, String? serverId, String? serverName, String? backendFolderKey, @JsonKey(fromJson: _mediaItemRawFromJson) Map? raw)? plex,TResult? Function(@JsonKey(includeToJson: false, includeFromJson: false) MediaBrowserDialect dialect, @JsonKey(readValue: readStringField, defaultValue: '') String id, @JsonKey(fromJson: _mediaKindFromJson, toJson: _mediaKindToJson) MediaKind kind, String? guid, String? title, String? titleSort, String? summary, String? tagline, String? originalTitle, String? studio, @JsonKey(fromJson: flexibleInt) int? year, String? originallyAvailableAt, String? contentRating, String? parentId, String? parentTitle, String? parentThumbPath, @JsonKey(fromJson: flexibleInt) int? parentIndex, @JsonKey(fromJson: flexibleInt) int? index, String? grandparentId, String? grandparentTitle, String? grandparentThumbPath, String? grandparentArtPath, List? grandparentBackdropPaths, String? thumbPath, String? artPath, List? backdropPaths, String? clearLogoPath, String? backgroundSquarePath, @JsonKey(fromJson: flexibleInt) int? durationMs, @JsonKey(fromJson: flexibleInt) int? viewOffsetMs, @JsonKey(fromJson: flexibleInt) int? viewCount, @JsonKey(fromJson: flexibleInt) int? lastViewedAt, @JsonKey(fromJson: flexibleInt) int? leafCount, @JsonKey(fromJson: flexibleInt) int? viewedLeafCount, @JsonKey(fromJson: flexibleInt) int? childCount, @JsonKey(fromJson: flexibleInt) int? addedAt, @JsonKey(fromJson: flexibleInt) int? updatedAt, @JsonKey(fromJson: flexibleDouble) double? rating, @JsonKey(fromJson: flexibleDouble) double? userRating, @JsonKey(fromJson: _mediaItemRatingsFromJson) List? ratings, bool? isFavorite, @JsonKey(fromJson: _mediaItemStringList) List? genres, @JsonKey(fromJson: _mediaItemStringList) List? directors, @JsonKey(fromJson: _mediaItemStringList) List? writers, @JsonKey(fromJson: _mediaItemStringList) List? producers, @JsonKey(fromJson: _mediaItemStringList) List? countries, @JsonKey(fromJson: _mediaItemStringList) List? collections, @JsonKey(fromJson: _mediaItemStringList) List? labels, @JsonKey(fromJson: _mediaItemStringList) List? styles, @JsonKey(fromJson: _mediaItemStringList) List? moods, @JsonKey(fromJson: _mediaItemRolesFromJson) List? roles, @JsonKey(fromJson: _mediaItemVersionsFromJson) List? mediaVersions, String? libraryId, String? libraryTitle, String? audioLanguage, String? playlistItemId, String? serverId, String? serverName, String? backendFolderKey, @JsonKey(fromJson: _mediaItemRawFromJson) Map? raw)? jellyfin,}) {final _that = this; +@optionalTypeArgs TResult? whenOrNull({TResult? Function(@JsonKey(readValue: readStringField, defaultValue: '') String id, @JsonKey(fromJson: _mediaKindFromJson, toJson: _mediaKindToJson) MediaKind kind, String? guid, String? title, String? titleSort, String? summary, String? tagline, String? originalTitle, String? editionTitle, String? studio, @JsonKey(fromJson: flexibleInt) int? year, String? originallyAvailableAt, String? contentRating, String? parentId, String? parentTitle, String? parentThumbPath, @JsonKey(fromJson: flexibleInt) int? parentIndex, @JsonKey(fromJson: flexibleInt) int? index, String? grandparentId, String? grandparentTitle, String? grandparentThumbPath, String? grandparentArtPath, List? grandparentBackdropPaths, String? thumbPath, String? artPath, List? backdropPaths, String? clearLogoPath, String? backgroundSquarePath, @JsonKey(fromJson: flexibleInt) int? durationMs, @JsonKey(fromJson: flexibleInt) int? viewOffsetMs, @JsonKey(fromJson: flexibleInt) int? viewCount, @JsonKey(fromJson: flexibleInt) int? lastViewedAt, @JsonKey(fromJson: flexibleInt) int? leafCount, @JsonKey(fromJson: flexibleInt) int? viewedLeafCount, @JsonKey(fromJson: flexibleInt) int? childCount, @JsonKey(fromJson: flexibleInt) int? addedAt, @JsonKey(fromJson: flexibleInt) int? updatedAt, @JsonKey(fromJson: flexibleDouble) double? rating, @JsonKey(fromJson: flexibleDouble) double? userRating, @JsonKey(fromJson: _mediaItemRatingsFromJson) List? ratings, bool? isFavorite, @JsonKey(fromJson: _mediaItemStringList) List? genres, @JsonKey(fromJson: _mediaItemStringList) List? directors, @JsonKey(fromJson: _mediaItemStringList) List? writers, @JsonKey(fromJson: _mediaItemStringList) List? producers, @JsonKey(fromJson: _mediaItemStringList) List? countries, @JsonKey(fromJson: _mediaItemStringList) List? collections, @JsonKey(fromJson: _mediaItemStringList) List? labels, @JsonKey(fromJson: _mediaItemStringList) List? styles, @JsonKey(fromJson: _mediaItemStringList) List? moods, @JsonKey(fromJson: _mediaItemRolesFromJson) List? roles, @JsonKey(fromJson: _mediaItemVersionsFromJson) List? mediaVersions, String? libraryId, String? libraryTitle, String? trailerKey, @JsonKey(fromJson: flexibleInt) int? playlistItemId, @JsonKey(fromJson: flexibleInt) int? playQueueItemId, String? subtype, String? serverId, String? serverName, String? backendFolderKey, @JsonKey(fromJson: _mediaItemRawFromJson) Map? raw)? plex,TResult? Function(@JsonKey(includeToJson: false, includeFromJson: false) MediaBrowserDialect dialect, @JsonKey(readValue: readStringField, defaultValue: '') String id, @JsonKey(fromJson: _mediaKindFromJson, toJson: _mediaKindToJson) MediaKind kind, String? guid, String? title, String? titleSort, String? summary, String? tagline, String? originalTitle, String? studio, @JsonKey(fromJson: flexibleInt) int? year, String? originallyAvailableAt, String? contentRating, String? parentId, String? parentTitle, String? parentThumbPath, @JsonKey(fromJson: flexibleInt) int? parentIndex, @JsonKey(fromJson: flexibleInt) int? index, String? grandparentId, String? grandparentTitle, String? grandparentThumbPath, String? grandparentArtPath, List? grandparentBackdropPaths, String? thumbPath, String? artPath, List? backdropPaths, String? clearLogoPath, String? backgroundSquarePath, @JsonKey(fromJson: flexibleInt) int? durationMs, @JsonKey(fromJson: flexibleInt) int? viewOffsetMs, @JsonKey(fromJson: flexibleInt) int? viewCount, @JsonKey(fromJson: flexibleInt) int? lastViewedAt, @JsonKey(fromJson: flexibleInt) int? leafCount, @JsonKey(fromJson: flexibleInt) int? viewedLeafCount, @JsonKey(fromJson: flexibleInt) int? childCount, @JsonKey(fromJson: flexibleInt) int? addedAt, @JsonKey(fromJson: flexibleInt) int? updatedAt, @JsonKey(fromJson: flexibleDouble) double? rating, @JsonKey(fromJson: flexibleDouble) double? userRating, @JsonKey(fromJson: _mediaItemRatingsFromJson) List? ratings, bool? isFavorite, @JsonKey(fromJson: _mediaItemStringList) List? genres, @JsonKey(fromJson: _mediaItemStringList) List? directors, @JsonKey(fromJson: _mediaItemStringList) List? writers, @JsonKey(fromJson: _mediaItemStringList) List? producers, @JsonKey(fromJson: _mediaItemStringList) List? countries, @JsonKey(fromJson: _mediaItemStringList) List? collections, @JsonKey(fromJson: _mediaItemStringList) List? labels, @JsonKey(fromJson: _mediaItemStringList) List? styles, @JsonKey(fromJson: _mediaItemStringList) List? moods, @JsonKey(fromJson: _mediaItemRolesFromJson) List? roles, @JsonKey(fromJson: _mediaItemVersionsFromJson) List? mediaVersions, String? libraryId, String? libraryTitle, String? playlistItemId, String? serverId, String? serverName, String? backendFolderKey, @JsonKey(fromJson: _mediaItemRawFromJson) Map? raw)? jellyfin,}) {final _that = this; switch (_that) { case PlexMediaItem() when plex != null: -return plex(_that.id,_that.kind,_that.guid,_that.title,_that.titleSort,_that.summary,_that.tagline,_that.originalTitle,_that.editionTitle,_that.studio,_that.year,_that.originallyAvailableAt,_that.contentRating,_that.parentId,_that.parentTitle,_that.parentThumbPath,_that.parentIndex,_that.index,_that.grandparentId,_that.grandparentTitle,_that.grandparentThumbPath,_that.grandparentArtPath,_that.grandparentBackdropPaths,_that.thumbPath,_that.artPath,_that.backdropPaths,_that.clearLogoPath,_that.backgroundSquarePath,_that.durationMs,_that.viewOffsetMs,_that.viewCount,_that.lastViewedAt,_that.leafCount,_that.viewedLeafCount,_that.childCount,_that.addedAt,_that.updatedAt,_that.rating,_that.userRating,_that.ratings,_that.isFavorite,_that.genres,_that.directors,_that.writers,_that.producers,_that.countries,_that.collections,_that.labels,_that.styles,_that.moods,_that.roles,_that.mediaVersions,_that.libraryId,_that.libraryTitle,_that.audioLanguage,_that.subtitleLanguage,_that.trailerKey,_that.playlistItemId,_that.playQueueItemId,_that.subtype,_that.serverId,_that.serverName,_that.backendFolderKey,_that.raw);case JellyfinMediaItem() when jellyfin != null: -return jellyfin(_that.dialect,_that.id,_that.kind,_that.guid,_that.title,_that.titleSort,_that.summary,_that.tagline,_that.originalTitle,_that.studio,_that.year,_that.originallyAvailableAt,_that.contentRating,_that.parentId,_that.parentTitle,_that.parentThumbPath,_that.parentIndex,_that.index,_that.grandparentId,_that.grandparentTitle,_that.grandparentThumbPath,_that.grandparentArtPath,_that.grandparentBackdropPaths,_that.thumbPath,_that.artPath,_that.backdropPaths,_that.clearLogoPath,_that.backgroundSquarePath,_that.durationMs,_that.viewOffsetMs,_that.viewCount,_that.lastViewedAt,_that.leafCount,_that.viewedLeafCount,_that.childCount,_that.addedAt,_that.updatedAt,_that.rating,_that.userRating,_that.ratings,_that.isFavorite,_that.genres,_that.directors,_that.writers,_that.producers,_that.countries,_that.collections,_that.labels,_that.styles,_that.moods,_that.roles,_that.mediaVersions,_that.libraryId,_that.libraryTitle,_that.audioLanguage,_that.playlistItemId,_that.serverId,_that.serverName,_that.backendFolderKey,_that.raw);case _: +return plex(_that.id,_that.kind,_that.guid,_that.title,_that.titleSort,_that.summary,_that.tagline,_that.originalTitle,_that.editionTitle,_that.studio,_that.year,_that.originallyAvailableAt,_that.contentRating,_that.parentId,_that.parentTitle,_that.parentThumbPath,_that.parentIndex,_that.index,_that.grandparentId,_that.grandparentTitle,_that.grandparentThumbPath,_that.grandparentArtPath,_that.grandparentBackdropPaths,_that.thumbPath,_that.artPath,_that.backdropPaths,_that.clearLogoPath,_that.backgroundSquarePath,_that.durationMs,_that.viewOffsetMs,_that.viewCount,_that.lastViewedAt,_that.leafCount,_that.viewedLeafCount,_that.childCount,_that.addedAt,_that.updatedAt,_that.rating,_that.userRating,_that.ratings,_that.isFavorite,_that.genres,_that.directors,_that.writers,_that.producers,_that.countries,_that.collections,_that.labels,_that.styles,_that.moods,_that.roles,_that.mediaVersions,_that.libraryId,_that.libraryTitle,_that.trailerKey,_that.playlistItemId,_that.playQueueItemId,_that.subtype,_that.serverId,_that.serverName,_that.backendFolderKey,_that.raw);case JellyfinMediaItem() when jellyfin != null: +return jellyfin(_that.dialect,_that.id,_that.kind,_that.guid,_that.title,_that.titleSort,_that.summary,_that.tagline,_that.originalTitle,_that.studio,_that.year,_that.originallyAvailableAt,_that.contentRating,_that.parentId,_that.parentTitle,_that.parentThumbPath,_that.parentIndex,_that.index,_that.grandparentId,_that.grandparentTitle,_that.grandparentThumbPath,_that.grandparentArtPath,_that.grandparentBackdropPaths,_that.thumbPath,_that.artPath,_that.backdropPaths,_that.clearLogoPath,_that.backgroundSquarePath,_that.durationMs,_that.viewOffsetMs,_that.viewCount,_that.lastViewedAt,_that.leafCount,_that.viewedLeafCount,_that.childCount,_that.addedAt,_that.updatedAt,_that.rating,_that.userRating,_that.ratings,_that.isFavorite,_that.genres,_that.directors,_that.writers,_that.producers,_that.countries,_that.collections,_that.labels,_that.styles,_that.moods,_that.roles,_that.mediaVersions,_that.libraryId,_that.libraryTitle,_that.playlistItemId,_that.serverId,_that.serverName,_that.backendFolderKey,_that.raw);case _: return null; } @@ -264,7 +263,7 @@ return jellyfin(_that.dialect,_that.id,_that.kind,_that.guid,_that.title,_that.t @JsonSerializable(includeIfNull: false, explicitToJson: true) class PlexMediaItem extends MediaItem { - const PlexMediaItem({@JsonKey(readValue: readStringField, defaultValue: '') required this.id, @JsonKey(fromJson: _mediaKindFromJson, toJson: _mediaKindToJson) required this.kind, this.guid, this.title, this.titleSort, this.summary, this.tagline, this.originalTitle, this.editionTitle, this.studio, @JsonKey(fromJson: flexibleInt) this.year, this.originallyAvailableAt, this.contentRating, this.parentId, this.parentTitle, this.parentThumbPath, @JsonKey(fromJson: flexibleInt) this.parentIndex, @JsonKey(fromJson: flexibleInt) this.index, this.grandparentId, this.grandparentTitle, this.grandparentThumbPath, this.grandparentArtPath, this.grandparentBackdropPaths, this.thumbPath, this.artPath, this.backdropPaths, this.clearLogoPath, this.backgroundSquarePath, @JsonKey(fromJson: flexibleInt) this.durationMs, @JsonKey(fromJson: flexibleInt) this.viewOffsetMs, @JsonKey(fromJson: flexibleInt) this.viewCount, @JsonKey(fromJson: flexibleInt) this.lastViewedAt, @JsonKey(fromJson: flexibleInt) this.leafCount, @JsonKey(fromJson: flexibleInt) this.viewedLeafCount, @JsonKey(fromJson: flexibleInt) this.childCount, @JsonKey(fromJson: flexibleInt) this.addedAt, @JsonKey(fromJson: flexibleInt) this.updatedAt, @JsonKey(fromJson: flexibleDouble) this.rating, @JsonKey(fromJson: flexibleDouble) this.userRating, @JsonKey(fromJson: _mediaItemRatingsFromJson) this.ratings, this.isFavorite, @JsonKey(fromJson: _mediaItemStringList) this.genres, @JsonKey(fromJson: _mediaItemStringList) this.directors, @JsonKey(fromJson: _mediaItemStringList) this.writers, @JsonKey(fromJson: _mediaItemStringList) this.producers, @JsonKey(fromJson: _mediaItemStringList) this.countries, @JsonKey(fromJson: _mediaItemStringList) this.collections, @JsonKey(fromJson: _mediaItemStringList) this.labels, @JsonKey(fromJson: _mediaItemStringList) this.styles, @JsonKey(fromJson: _mediaItemStringList) this.moods, @JsonKey(fromJson: _mediaItemRolesFromJson) this.roles, @JsonKey(fromJson: _mediaItemVersionsFromJson) this.mediaVersions, this.libraryId, this.libraryTitle, this.audioLanguage, this.subtitleLanguage, this.trailerKey, @JsonKey(fromJson: flexibleInt) this.playlistItemId, @JsonKey(fromJson: flexibleInt) this.playQueueItemId, this.subtype, this.serverId, this.serverName, this.backendFolderKey, @JsonKey(fromJson: _mediaItemRawFromJson) this.raw}): super._(); + const PlexMediaItem({@JsonKey(readValue: readStringField, defaultValue: '') required this.id, @JsonKey(fromJson: _mediaKindFromJson, toJson: _mediaKindToJson) required this.kind, this.guid, this.title, this.titleSort, this.summary, this.tagline, this.originalTitle, this.editionTitle, this.studio, @JsonKey(fromJson: flexibleInt) this.year, this.originallyAvailableAt, this.contentRating, this.parentId, this.parentTitle, this.parentThumbPath, @JsonKey(fromJson: flexibleInt) this.parentIndex, @JsonKey(fromJson: flexibleInt) this.index, this.grandparentId, this.grandparentTitle, this.grandparentThumbPath, this.grandparentArtPath, this.grandparentBackdropPaths, this.thumbPath, this.artPath, this.backdropPaths, this.clearLogoPath, this.backgroundSquarePath, @JsonKey(fromJson: flexibleInt) this.durationMs, @JsonKey(fromJson: flexibleInt) this.viewOffsetMs, @JsonKey(fromJson: flexibleInt) this.viewCount, @JsonKey(fromJson: flexibleInt) this.lastViewedAt, @JsonKey(fromJson: flexibleInt) this.leafCount, @JsonKey(fromJson: flexibleInt) this.viewedLeafCount, @JsonKey(fromJson: flexibleInt) this.childCount, @JsonKey(fromJson: flexibleInt) this.addedAt, @JsonKey(fromJson: flexibleInt) this.updatedAt, @JsonKey(fromJson: flexibleDouble) this.rating, @JsonKey(fromJson: flexibleDouble) this.userRating, @JsonKey(fromJson: _mediaItemRatingsFromJson) this.ratings, this.isFavorite, @JsonKey(fromJson: _mediaItemStringList) this.genres, @JsonKey(fromJson: _mediaItemStringList) this.directors, @JsonKey(fromJson: _mediaItemStringList) this.writers, @JsonKey(fromJson: _mediaItemStringList) this.producers, @JsonKey(fromJson: _mediaItemStringList) this.countries, @JsonKey(fromJson: _mediaItemStringList) this.collections, @JsonKey(fromJson: _mediaItemStringList) this.labels, @JsonKey(fromJson: _mediaItemStringList) this.styles, @JsonKey(fromJson: _mediaItemStringList) this.moods, @JsonKey(fromJson: _mediaItemRolesFromJson) this.roles, @JsonKey(fromJson: _mediaItemVersionsFromJson) this.mediaVersions, this.libraryId, this.libraryTitle, this.trailerKey, @JsonKey(fromJson: flexibleInt) this.playlistItemId, @JsonKey(fromJson: flexibleInt) this.playQueueItemId, this.subtype, this.serverId, this.serverName, this.backendFolderKey, @JsonKey(fromJson: _mediaItemRawFromJson) this.raw}): super._(); @override@JsonKey(readValue: readStringField, defaultValue: '') final String id; @@ -326,8 +325,6 @@ class PlexMediaItem extends MediaItem { @override@JsonKey(fromJson: _mediaItemVersionsFromJson) final List? mediaVersions; @override final String? libraryId; @override final String? libraryTitle; -@override final String? audioLanguage; - final String? subtitleLanguage; final String? trailerKey; @override@JsonKey(fromJson: flexibleInt) final int? playlistItemId; @JsonKey(fromJson: flexibleInt) final int? playQueueItemId; @@ -354,7 +351,7 @@ $PlexMediaItemCopyWith get copyWith => _$PlexMediaItemCopyWithImp @override String toString() { - return 'MediaItem.plex(id: $id, kind: $kind, guid: $guid, title: $title, titleSort: $titleSort, summary: $summary, tagline: $tagline, originalTitle: $originalTitle, editionTitle: $editionTitle, studio: $studio, year: $year, originallyAvailableAt: $originallyAvailableAt, contentRating: $contentRating, parentId: $parentId, parentTitle: $parentTitle, parentThumbPath: $parentThumbPath, parentIndex: $parentIndex, index: $index, grandparentId: $grandparentId, grandparentTitle: $grandparentTitle, grandparentThumbPath: $grandparentThumbPath, grandparentArtPath: $grandparentArtPath, grandparentBackdropPaths: $grandparentBackdropPaths, thumbPath: $thumbPath, artPath: $artPath, backdropPaths: $backdropPaths, clearLogoPath: $clearLogoPath, backgroundSquarePath: $backgroundSquarePath, durationMs: $durationMs, viewOffsetMs: $viewOffsetMs, viewCount: $viewCount, lastViewedAt: $lastViewedAt, leafCount: $leafCount, viewedLeafCount: $viewedLeafCount, childCount: $childCount, addedAt: $addedAt, updatedAt: $updatedAt, rating: $rating, userRating: $userRating, ratings: $ratings, isFavorite: $isFavorite, genres: $genres, directors: $directors, writers: $writers, producers: $producers, countries: $countries, collections: $collections, labels: $labels, styles: $styles, moods: $moods, roles: $roles, mediaVersions: $mediaVersions, libraryId: $libraryId, libraryTitle: $libraryTitle, audioLanguage: $audioLanguage, subtitleLanguage: $subtitleLanguage, trailerKey: $trailerKey, playlistItemId: $playlistItemId, playQueueItemId: $playQueueItemId, subtype: $subtype, serverId: $serverId, serverName: $serverName, backendFolderKey: $backendFolderKey, raw: $raw)'; + return 'MediaItem.plex(id: $id, kind: $kind, guid: $guid, title: $title, titleSort: $titleSort, summary: $summary, tagline: $tagline, originalTitle: $originalTitle, editionTitle: $editionTitle, studio: $studio, year: $year, originallyAvailableAt: $originallyAvailableAt, contentRating: $contentRating, parentId: $parentId, parentTitle: $parentTitle, parentThumbPath: $parentThumbPath, parentIndex: $parentIndex, index: $index, grandparentId: $grandparentId, grandparentTitle: $grandparentTitle, grandparentThumbPath: $grandparentThumbPath, grandparentArtPath: $grandparentArtPath, grandparentBackdropPaths: $grandparentBackdropPaths, thumbPath: $thumbPath, artPath: $artPath, backdropPaths: $backdropPaths, clearLogoPath: $clearLogoPath, backgroundSquarePath: $backgroundSquarePath, durationMs: $durationMs, viewOffsetMs: $viewOffsetMs, viewCount: $viewCount, lastViewedAt: $lastViewedAt, leafCount: $leafCount, viewedLeafCount: $viewedLeafCount, childCount: $childCount, addedAt: $addedAt, updatedAt: $updatedAt, rating: $rating, userRating: $userRating, ratings: $ratings, isFavorite: $isFavorite, genres: $genres, directors: $directors, writers: $writers, producers: $producers, countries: $countries, collections: $collections, labels: $labels, styles: $styles, moods: $moods, roles: $roles, mediaVersions: $mediaVersions, libraryId: $libraryId, libraryTitle: $libraryTitle, trailerKey: $trailerKey, playlistItemId: $playlistItemId, playQueueItemId: $playQueueItemId, subtype: $subtype, serverId: $serverId, serverName: $serverName, backendFolderKey: $backendFolderKey, raw: $raw)'; } @@ -365,7 +362,7 @@ abstract mixin class $PlexMediaItemCopyWith<$Res> implements $MediaItemCopyWith< factory $PlexMediaItemCopyWith(PlexMediaItem value, $Res Function(PlexMediaItem) _then) = _$PlexMediaItemCopyWithImpl; @override @useResult $Res call({ -@JsonKey(readValue: readStringField, defaultValue: '') String id,@JsonKey(fromJson: _mediaKindFromJson, toJson: _mediaKindToJson) MediaKind kind, String? guid, String? title, String? titleSort, String? summary, String? tagline, String? originalTitle, String? editionTitle, String? studio,@JsonKey(fromJson: flexibleInt) int? year, String? originallyAvailableAt, String? contentRating, String? parentId, String? parentTitle, String? parentThumbPath,@JsonKey(fromJson: flexibleInt) int? parentIndex,@JsonKey(fromJson: flexibleInt) int? index, String? grandparentId, String? grandparentTitle, String? grandparentThumbPath, String? grandparentArtPath, List? grandparentBackdropPaths, String? thumbPath, String? artPath, List? backdropPaths, String? clearLogoPath, String? backgroundSquarePath,@JsonKey(fromJson: flexibleInt) int? durationMs,@JsonKey(fromJson: flexibleInt) int? viewOffsetMs,@JsonKey(fromJson: flexibleInt) int? viewCount,@JsonKey(fromJson: flexibleInt) int? lastViewedAt,@JsonKey(fromJson: flexibleInt) int? leafCount,@JsonKey(fromJson: flexibleInt) int? viewedLeafCount,@JsonKey(fromJson: flexibleInt) int? childCount,@JsonKey(fromJson: flexibleInt) int? addedAt,@JsonKey(fromJson: flexibleInt) int? updatedAt,@JsonKey(fromJson: flexibleDouble) double? rating,@JsonKey(fromJson: flexibleDouble) double? userRating,@JsonKey(fromJson: _mediaItemRatingsFromJson) List? ratings, bool? isFavorite,@JsonKey(fromJson: _mediaItemStringList) List? genres,@JsonKey(fromJson: _mediaItemStringList) List? directors,@JsonKey(fromJson: _mediaItemStringList) List? writers,@JsonKey(fromJson: _mediaItemStringList) List? producers,@JsonKey(fromJson: _mediaItemStringList) List? countries,@JsonKey(fromJson: _mediaItemStringList) List? collections,@JsonKey(fromJson: _mediaItemStringList) List? labels,@JsonKey(fromJson: _mediaItemStringList) List? styles,@JsonKey(fromJson: _mediaItemStringList) List? moods,@JsonKey(fromJson: _mediaItemRolesFromJson) List? roles,@JsonKey(fromJson: _mediaItemVersionsFromJson) List? mediaVersions, String? libraryId, String? libraryTitle, String? audioLanguage, String? subtitleLanguage, String? trailerKey,@JsonKey(fromJson: flexibleInt) int? playlistItemId,@JsonKey(fromJson: flexibleInt) int? playQueueItemId, String? subtype, String? serverId, String? serverName, String? backendFolderKey,@JsonKey(fromJson: _mediaItemRawFromJson) Map? raw +@JsonKey(readValue: readStringField, defaultValue: '') String id,@JsonKey(fromJson: _mediaKindFromJson, toJson: _mediaKindToJson) MediaKind kind, String? guid, String? title, String? titleSort, String? summary, String? tagline, String? originalTitle, String? editionTitle, String? studio,@JsonKey(fromJson: flexibleInt) int? year, String? originallyAvailableAt, String? contentRating, String? parentId, String? parentTitle, String? parentThumbPath,@JsonKey(fromJson: flexibleInt) int? parentIndex,@JsonKey(fromJson: flexibleInt) int? index, String? grandparentId, String? grandparentTitle, String? grandparentThumbPath, String? grandparentArtPath, List? grandparentBackdropPaths, String? thumbPath, String? artPath, List? backdropPaths, String? clearLogoPath, String? backgroundSquarePath,@JsonKey(fromJson: flexibleInt) int? durationMs,@JsonKey(fromJson: flexibleInt) int? viewOffsetMs,@JsonKey(fromJson: flexibleInt) int? viewCount,@JsonKey(fromJson: flexibleInt) int? lastViewedAt,@JsonKey(fromJson: flexibleInt) int? leafCount,@JsonKey(fromJson: flexibleInt) int? viewedLeafCount,@JsonKey(fromJson: flexibleInt) int? childCount,@JsonKey(fromJson: flexibleInt) int? addedAt,@JsonKey(fromJson: flexibleInt) int? updatedAt,@JsonKey(fromJson: flexibleDouble) double? rating,@JsonKey(fromJson: flexibleDouble) double? userRating,@JsonKey(fromJson: _mediaItemRatingsFromJson) List? ratings, bool? isFavorite,@JsonKey(fromJson: _mediaItemStringList) List? genres,@JsonKey(fromJson: _mediaItemStringList) List? directors,@JsonKey(fromJson: _mediaItemStringList) List? writers,@JsonKey(fromJson: _mediaItemStringList) List? producers,@JsonKey(fromJson: _mediaItemStringList) List? countries,@JsonKey(fromJson: _mediaItemStringList) List? collections,@JsonKey(fromJson: _mediaItemStringList) List? labels,@JsonKey(fromJson: _mediaItemStringList) List? styles,@JsonKey(fromJson: _mediaItemStringList) List? moods,@JsonKey(fromJson: _mediaItemRolesFromJson) List? roles,@JsonKey(fromJson: _mediaItemVersionsFromJson) List? mediaVersions, String? libraryId, String? libraryTitle, String? trailerKey,@JsonKey(fromJson: flexibleInt) int? playlistItemId,@JsonKey(fromJson: flexibleInt) int? playQueueItemId, String? subtype, String? serverId, String? serverName, String? backendFolderKey,@JsonKey(fromJson: _mediaItemRawFromJson) Map? raw }); @@ -382,7 +379,7 @@ class _$PlexMediaItemCopyWithImpl<$Res> /// Create a copy of MediaItem /// with the given fields replaced by the non-null parameter values. -@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? kind = null,Object? guid = freezed,Object? title = freezed,Object? titleSort = freezed,Object? summary = freezed,Object? tagline = freezed,Object? originalTitle = freezed,Object? editionTitle = freezed,Object? studio = freezed,Object? year = freezed,Object? originallyAvailableAt = freezed,Object? contentRating = freezed,Object? parentId = freezed,Object? parentTitle = freezed,Object? parentThumbPath = freezed,Object? parentIndex = freezed,Object? index = freezed,Object? grandparentId = freezed,Object? grandparentTitle = freezed,Object? grandparentThumbPath = freezed,Object? grandparentArtPath = freezed,Object? grandparentBackdropPaths = freezed,Object? thumbPath = freezed,Object? artPath = freezed,Object? backdropPaths = freezed,Object? clearLogoPath = freezed,Object? backgroundSquarePath = freezed,Object? durationMs = freezed,Object? viewOffsetMs = freezed,Object? viewCount = freezed,Object? lastViewedAt = freezed,Object? leafCount = freezed,Object? viewedLeafCount = freezed,Object? childCount = freezed,Object? addedAt = freezed,Object? updatedAt = freezed,Object? rating = freezed,Object? userRating = freezed,Object? ratings = freezed,Object? isFavorite = freezed,Object? genres = freezed,Object? directors = freezed,Object? writers = freezed,Object? producers = freezed,Object? countries = freezed,Object? collections = freezed,Object? labels = freezed,Object? styles = freezed,Object? moods = freezed,Object? roles = freezed,Object? mediaVersions = freezed,Object? libraryId = freezed,Object? libraryTitle = freezed,Object? audioLanguage = freezed,Object? subtitleLanguage = freezed,Object? trailerKey = freezed,Object? playlistItemId = freezed,Object? playQueueItemId = freezed,Object? subtype = freezed,Object? serverId = freezed,Object? serverName = freezed,Object? backendFolderKey = freezed,Object? raw = freezed,}) { +@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? kind = null,Object? guid = freezed,Object? title = freezed,Object? titleSort = freezed,Object? summary = freezed,Object? tagline = freezed,Object? originalTitle = freezed,Object? editionTitle = freezed,Object? studio = freezed,Object? year = freezed,Object? originallyAvailableAt = freezed,Object? contentRating = freezed,Object? parentId = freezed,Object? parentTitle = freezed,Object? parentThumbPath = freezed,Object? parentIndex = freezed,Object? index = freezed,Object? grandparentId = freezed,Object? grandparentTitle = freezed,Object? grandparentThumbPath = freezed,Object? grandparentArtPath = freezed,Object? grandparentBackdropPaths = freezed,Object? thumbPath = freezed,Object? artPath = freezed,Object? backdropPaths = freezed,Object? clearLogoPath = freezed,Object? backgroundSquarePath = freezed,Object? durationMs = freezed,Object? viewOffsetMs = freezed,Object? viewCount = freezed,Object? lastViewedAt = freezed,Object? leafCount = freezed,Object? viewedLeafCount = freezed,Object? childCount = freezed,Object? addedAt = freezed,Object? updatedAt = freezed,Object? rating = freezed,Object? userRating = freezed,Object? ratings = freezed,Object? isFavorite = freezed,Object? genres = freezed,Object? directors = freezed,Object? writers = freezed,Object? producers = freezed,Object? countries = freezed,Object? collections = freezed,Object? labels = freezed,Object? styles = freezed,Object? moods = freezed,Object? roles = freezed,Object? mediaVersions = freezed,Object? libraryId = freezed,Object? libraryTitle = freezed,Object? trailerKey = freezed,Object? playlistItemId = freezed,Object? playQueueItemId = freezed,Object? subtype = freezed,Object? serverId = freezed,Object? serverName = freezed,Object? backendFolderKey = freezed,Object? raw = freezed,}) { return _then(PlexMediaItem( id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable as String,kind: null == kind ? _self.kind : kind // ignore: cast_nullable_to_non_nullable @@ -438,8 +435,6 @@ as List?,roles: freezed == roles ? _self.roles : roles // ignore: cast_n as List?,mediaVersions: freezed == mediaVersions ? _self.mediaVersions : mediaVersions // ignore: cast_nullable_to_non_nullable as List?,libraryId: freezed == libraryId ? _self.libraryId : libraryId // ignore: cast_nullable_to_non_nullable as String?,libraryTitle: freezed == libraryTitle ? _self.libraryTitle : libraryTitle // ignore: cast_nullable_to_non_nullable -as String?,audioLanguage: freezed == audioLanguage ? _self.audioLanguage : audioLanguage // ignore: cast_nullable_to_non_nullable -as String?,subtitleLanguage: freezed == subtitleLanguage ? _self.subtitleLanguage : subtitleLanguage // ignore: cast_nullable_to_non_nullable as String?,trailerKey: freezed == trailerKey ? _self.trailerKey : trailerKey // ignore: cast_nullable_to_non_nullable as String?,playlistItemId: freezed == playlistItemId ? _self.playlistItemId : playlistItemId // ignore: cast_nullable_to_non_nullable as int?,playQueueItemId: freezed == playQueueItemId ? _self.playQueueItemId : playQueueItemId // ignore: cast_nullable_to_non_nullable @@ -459,7 +454,7 @@ as Map?, @JsonSerializable(includeIfNull: false, explicitToJson: true) class JellyfinMediaItem extends MediaItem { - const JellyfinMediaItem({@JsonKey(includeToJson: false, includeFromJson: false) this.dialect = MediaBrowserDialect.jellyfin, @JsonKey(readValue: readStringField, defaultValue: '') required this.id, @JsonKey(fromJson: _mediaKindFromJson, toJson: _mediaKindToJson) required this.kind, this.guid, this.title, this.titleSort, this.summary, this.tagline, this.originalTitle, this.studio, @JsonKey(fromJson: flexibleInt) this.year, this.originallyAvailableAt, this.contentRating, this.parentId, this.parentTitle, this.parentThumbPath, @JsonKey(fromJson: flexibleInt) this.parentIndex, @JsonKey(fromJson: flexibleInt) this.index, this.grandparentId, this.grandparentTitle, this.grandparentThumbPath, this.grandparentArtPath, this.grandparentBackdropPaths, this.thumbPath, this.artPath, this.backdropPaths, this.clearLogoPath, this.backgroundSquarePath, @JsonKey(fromJson: flexibleInt) this.durationMs, @JsonKey(fromJson: flexibleInt) this.viewOffsetMs, @JsonKey(fromJson: flexibleInt) this.viewCount, @JsonKey(fromJson: flexibleInt) this.lastViewedAt, @JsonKey(fromJson: flexibleInt) this.leafCount, @JsonKey(fromJson: flexibleInt) this.viewedLeafCount, @JsonKey(fromJson: flexibleInt) this.childCount, @JsonKey(fromJson: flexibleInt) this.addedAt, @JsonKey(fromJson: flexibleInt) this.updatedAt, @JsonKey(fromJson: flexibleDouble) this.rating, @JsonKey(fromJson: flexibleDouble) this.userRating, @JsonKey(fromJson: _mediaItemRatingsFromJson) this.ratings, this.isFavorite, @JsonKey(fromJson: _mediaItemStringList) this.genres, @JsonKey(fromJson: _mediaItemStringList) this.directors, @JsonKey(fromJson: _mediaItemStringList) this.writers, @JsonKey(fromJson: _mediaItemStringList) this.producers, @JsonKey(fromJson: _mediaItemStringList) this.countries, @JsonKey(fromJson: _mediaItemStringList) this.collections, @JsonKey(fromJson: _mediaItemStringList) this.labels, @JsonKey(fromJson: _mediaItemStringList) this.styles, @JsonKey(fromJson: _mediaItemStringList) this.moods, @JsonKey(fromJson: _mediaItemRolesFromJson) this.roles, @JsonKey(fromJson: _mediaItemVersionsFromJson) this.mediaVersions, this.libraryId, this.libraryTitle, this.audioLanguage, this.playlistItemId, this.serverId, this.serverName, this.backendFolderKey, @JsonKey(fromJson: _mediaItemRawFromJson) this.raw}): super._(); + const JellyfinMediaItem({@JsonKey(includeToJson: false, includeFromJson: false) this.dialect = MediaBrowserDialect.jellyfin, @JsonKey(readValue: readStringField, defaultValue: '') required this.id, @JsonKey(fromJson: _mediaKindFromJson, toJson: _mediaKindToJson) required this.kind, this.guid, this.title, this.titleSort, this.summary, this.tagline, this.originalTitle, this.studio, @JsonKey(fromJson: flexibleInt) this.year, this.originallyAvailableAt, this.contentRating, this.parentId, this.parentTitle, this.parentThumbPath, @JsonKey(fromJson: flexibleInt) this.parentIndex, @JsonKey(fromJson: flexibleInt) this.index, this.grandparentId, this.grandparentTitle, this.grandparentThumbPath, this.grandparentArtPath, this.grandparentBackdropPaths, this.thumbPath, this.artPath, this.backdropPaths, this.clearLogoPath, this.backgroundSquarePath, @JsonKey(fromJson: flexibleInt) this.durationMs, @JsonKey(fromJson: flexibleInt) this.viewOffsetMs, @JsonKey(fromJson: flexibleInt) this.viewCount, @JsonKey(fromJson: flexibleInt) this.lastViewedAt, @JsonKey(fromJson: flexibleInt) this.leafCount, @JsonKey(fromJson: flexibleInt) this.viewedLeafCount, @JsonKey(fromJson: flexibleInt) this.childCount, @JsonKey(fromJson: flexibleInt) this.addedAt, @JsonKey(fromJson: flexibleInt) this.updatedAt, @JsonKey(fromJson: flexibleDouble) this.rating, @JsonKey(fromJson: flexibleDouble) this.userRating, @JsonKey(fromJson: _mediaItemRatingsFromJson) this.ratings, this.isFavorite, @JsonKey(fromJson: _mediaItemStringList) this.genres, @JsonKey(fromJson: _mediaItemStringList) this.directors, @JsonKey(fromJson: _mediaItemStringList) this.writers, @JsonKey(fromJson: _mediaItemStringList) this.producers, @JsonKey(fromJson: _mediaItemStringList) this.countries, @JsonKey(fromJson: _mediaItemStringList) this.collections, @JsonKey(fromJson: _mediaItemStringList) this.labels, @JsonKey(fromJson: _mediaItemStringList) this.styles, @JsonKey(fromJson: _mediaItemStringList) this.moods, @JsonKey(fromJson: _mediaItemRolesFromJson) this.roles, @JsonKey(fromJson: _mediaItemVersionsFromJson) this.mediaVersions, this.libraryId, this.libraryTitle, this.playlistItemId, this.serverId, this.serverName, this.backendFolderKey, @JsonKey(fromJson: _mediaItemRawFromJson) this.raw}): super._(); /// Which MediaBrowser dialect produced this item. @@ -524,7 +519,6 @@ class JellyfinMediaItem extends MediaItem { @override@JsonKey(fromJson: _mediaItemVersionsFromJson) final List? mediaVersions; @override final String? libraryId; @override final String? libraryTitle; -@override final String? audioLanguage; /// Jellyfin playlist entry id used by playlist write endpoints. @override final String? playlistItemId; @override final String? serverId; @@ -546,7 +540,7 @@ $JellyfinMediaItemCopyWith get copyWith => _$JellyfinMediaIte @override String toString() { - return 'MediaItem.jellyfin(dialect: $dialect, id: $id, kind: $kind, guid: $guid, title: $title, titleSort: $titleSort, summary: $summary, tagline: $tagline, originalTitle: $originalTitle, studio: $studio, year: $year, originallyAvailableAt: $originallyAvailableAt, contentRating: $contentRating, parentId: $parentId, parentTitle: $parentTitle, parentThumbPath: $parentThumbPath, parentIndex: $parentIndex, index: $index, grandparentId: $grandparentId, grandparentTitle: $grandparentTitle, grandparentThumbPath: $grandparentThumbPath, grandparentArtPath: $grandparentArtPath, grandparentBackdropPaths: $grandparentBackdropPaths, thumbPath: $thumbPath, artPath: $artPath, backdropPaths: $backdropPaths, clearLogoPath: $clearLogoPath, backgroundSquarePath: $backgroundSquarePath, durationMs: $durationMs, viewOffsetMs: $viewOffsetMs, viewCount: $viewCount, lastViewedAt: $lastViewedAt, leafCount: $leafCount, viewedLeafCount: $viewedLeafCount, childCount: $childCount, addedAt: $addedAt, updatedAt: $updatedAt, rating: $rating, userRating: $userRating, ratings: $ratings, isFavorite: $isFavorite, genres: $genres, directors: $directors, writers: $writers, producers: $producers, countries: $countries, collections: $collections, labels: $labels, styles: $styles, moods: $moods, roles: $roles, mediaVersions: $mediaVersions, libraryId: $libraryId, libraryTitle: $libraryTitle, audioLanguage: $audioLanguage, playlistItemId: $playlistItemId, serverId: $serverId, serverName: $serverName, backendFolderKey: $backendFolderKey, raw: $raw)'; + return 'MediaItem.jellyfin(dialect: $dialect, id: $id, kind: $kind, guid: $guid, title: $title, titleSort: $titleSort, summary: $summary, tagline: $tagline, originalTitle: $originalTitle, studio: $studio, year: $year, originallyAvailableAt: $originallyAvailableAt, contentRating: $contentRating, parentId: $parentId, parentTitle: $parentTitle, parentThumbPath: $parentThumbPath, parentIndex: $parentIndex, index: $index, grandparentId: $grandparentId, grandparentTitle: $grandparentTitle, grandparentThumbPath: $grandparentThumbPath, grandparentArtPath: $grandparentArtPath, grandparentBackdropPaths: $grandparentBackdropPaths, thumbPath: $thumbPath, artPath: $artPath, backdropPaths: $backdropPaths, clearLogoPath: $clearLogoPath, backgroundSquarePath: $backgroundSquarePath, durationMs: $durationMs, viewOffsetMs: $viewOffsetMs, viewCount: $viewCount, lastViewedAt: $lastViewedAt, leafCount: $leafCount, viewedLeafCount: $viewedLeafCount, childCount: $childCount, addedAt: $addedAt, updatedAt: $updatedAt, rating: $rating, userRating: $userRating, ratings: $ratings, isFavorite: $isFavorite, genres: $genres, directors: $directors, writers: $writers, producers: $producers, countries: $countries, collections: $collections, labels: $labels, styles: $styles, moods: $moods, roles: $roles, mediaVersions: $mediaVersions, libraryId: $libraryId, libraryTitle: $libraryTitle, playlistItemId: $playlistItemId, serverId: $serverId, serverName: $serverName, backendFolderKey: $backendFolderKey, raw: $raw)'; } @@ -557,7 +551,7 @@ abstract mixin class $JellyfinMediaItemCopyWith<$Res> implements $MediaItemCopyW factory $JellyfinMediaItemCopyWith(JellyfinMediaItem value, $Res Function(JellyfinMediaItem) _then) = _$JellyfinMediaItemCopyWithImpl; @override @useResult $Res call({ -@JsonKey(includeToJson: false, includeFromJson: false) MediaBrowserDialect dialect,@JsonKey(readValue: readStringField, defaultValue: '') String id,@JsonKey(fromJson: _mediaKindFromJson, toJson: _mediaKindToJson) MediaKind kind, String? guid, String? title, String? titleSort, String? summary, String? tagline, String? originalTitle, String? studio,@JsonKey(fromJson: flexibleInt) int? year, String? originallyAvailableAt, String? contentRating, String? parentId, String? parentTitle, String? parentThumbPath,@JsonKey(fromJson: flexibleInt) int? parentIndex,@JsonKey(fromJson: flexibleInt) int? index, String? grandparentId, String? grandparentTitle, String? grandparentThumbPath, String? grandparentArtPath, List? grandparentBackdropPaths, String? thumbPath, String? artPath, List? backdropPaths, String? clearLogoPath, String? backgroundSquarePath,@JsonKey(fromJson: flexibleInt) int? durationMs,@JsonKey(fromJson: flexibleInt) int? viewOffsetMs,@JsonKey(fromJson: flexibleInt) int? viewCount,@JsonKey(fromJson: flexibleInt) int? lastViewedAt,@JsonKey(fromJson: flexibleInt) int? leafCount,@JsonKey(fromJson: flexibleInt) int? viewedLeafCount,@JsonKey(fromJson: flexibleInt) int? childCount,@JsonKey(fromJson: flexibleInt) int? addedAt,@JsonKey(fromJson: flexibleInt) int? updatedAt,@JsonKey(fromJson: flexibleDouble) double? rating,@JsonKey(fromJson: flexibleDouble) double? userRating,@JsonKey(fromJson: _mediaItemRatingsFromJson) List? ratings, bool? isFavorite,@JsonKey(fromJson: _mediaItemStringList) List? genres,@JsonKey(fromJson: _mediaItemStringList) List? directors,@JsonKey(fromJson: _mediaItemStringList) List? writers,@JsonKey(fromJson: _mediaItemStringList) List? producers,@JsonKey(fromJson: _mediaItemStringList) List? countries,@JsonKey(fromJson: _mediaItemStringList) List? collections,@JsonKey(fromJson: _mediaItemStringList) List? labels,@JsonKey(fromJson: _mediaItemStringList) List? styles,@JsonKey(fromJson: _mediaItemStringList) List? moods,@JsonKey(fromJson: _mediaItemRolesFromJson) List? roles,@JsonKey(fromJson: _mediaItemVersionsFromJson) List? mediaVersions, String? libraryId, String? libraryTitle, String? audioLanguage, String? playlistItemId, String? serverId, String? serverName, String? backendFolderKey,@JsonKey(fromJson: _mediaItemRawFromJson) Map? raw +@JsonKey(includeToJson: false, includeFromJson: false) MediaBrowserDialect dialect,@JsonKey(readValue: readStringField, defaultValue: '') String id,@JsonKey(fromJson: _mediaKindFromJson, toJson: _mediaKindToJson) MediaKind kind, String? guid, String? title, String? titleSort, String? summary, String? tagline, String? originalTitle, String? studio,@JsonKey(fromJson: flexibleInt) int? year, String? originallyAvailableAt, String? contentRating, String? parentId, String? parentTitle, String? parentThumbPath,@JsonKey(fromJson: flexibleInt) int? parentIndex,@JsonKey(fromJson: flexibleInt) int? index, String? grandparentId, String? grandparentTitle, String? grandparentThumbPath, String? grandparentArtPath, List? grandparentBackdropPaths, String? thumbPath, String? artPath, List? backdropPaths, String? clearLogoPath, String? backgroundSquarePath,@JsonKey(fromJson: flexibleInt) int? durationMs,@JsonKey(fromJson: flexibleInt) int? viewOffsetMs,@JsonKey(fromJson: flexibleInt) int? viewCount,@JsonKey(fromJson: flexibleInt) int? lastViewedAt,@JsonKey(fromJson: flexibleInt) int? leafCount,@JsonKey(fromJson: flexibleInt) int? viewedLeafCount,@JsonKey(fromJson: flexibleInt) int? childCount,@JsonKey(fromJson: flexibleInt) int? addedAt,@JsonKey(fromJson: flexibleInt) int? updatedAt,@JsonKey(fromJson: flexibleDouble) double? rating,@JsonKey(fromJson: flexibleDouble) double? userRating,@JsonKey(fromJson: _mediaItemRatingsFromJson) List? ratings, bool? isFavorite,@JsonKey(fromJson: _mediaItemStringList) List? genres,@JsonKey(fromJson: _mediaItemStringList) List? directors,@JsonKey(fromJson: _mediaItemStringList) List? writers,@JsonKey(fromJson: _mediaItemStringList) List? producers,@JsonKey(fromJson: _mediaItemStringList) List? countries,@JsonKey(fromJson: _mediaItemStringList) List? collections,@JsonKey(fromJson: _mediaItemStringList) List? labels,@JsonKey(fromJson: _mediaItemStringList) List? styles,@JsonKey(fromJson: _mediaItemStringList) List? moods,@JsonKey(fromJson: _mediaItemRolesFromJson) List? roles,@JsonKey(fromJson: _mediaItemVersionsFromJson) List? mediaVersions, String? libraryId, String? libraryTitle, String? playlistItemId, String? serverId, String? serverName, String? backendFolderKey,@JsonKey(fromJson: _mediaItemRawFromJson) Map? raw }); @@ -574,7 +568,7 @@ class _$JellyfinMediaItemCopyWithImpl<$Res> /// Create a copy of MediaItem /// with the given fields replaced by the non-null parameter values. -@override @pragma('vm:prefer-inline') $Res call({Object? dialect = null,Object? id = null,Object? kind = null,Object? guid = freezed,Object? title = freezed,Object? titleSort = freezed,Object? summary = freezed,Object? tagline = freezed,Object? originalTitle = freezed,Object? studio = freezed,Object? year = freezed,Object? originallyAvailableAt = freezed,Object? contentRating = freezed,Object? parentId = freezed,Object? parentTitle = freezed,Object? parentThumbPath = freezed,Object? parentIndex = freezed,Object? index = freezed,Object? grandparentId = freezed,Object? grandparentTitle = freezed,Object? grandparentThumbPath = freezed,Object? grandparentArtPath = freezed,Object? grandparentBackdropPaths = freezed,Object? thumbPath = freezed,Object? artPath = freezed,Object? backdropPaths = freezed,Object? clearLogoPath = freezed,Object? backgroundSquarePath = freezed,Object? durationMs = freezed,Object? viewOffsetMs = freezed,Object? viewCount = freezed,Object? lastViewedAt = freezed,Object? leafCount = freezed,Object? viewedLeafCount = freezed,Object? childCount = freezed,Object? addedAt = freezed,Object? updatedAt = freezed,Object? rating = freezed,Object? userRating = freezed,Object? ratings = freezed,Object? isFavorite = freezed,Object? genres = freezed,Object? directors = freezed,Object? writers = freezed,Object? producers = freezed,Object? countries = freezed,Object? collections = freezed,Object? labels = freezed,Object? styles = freezed,Object? moods = freezed,Object? roles = freezed,Object? mediaVersions = freezed,Object? libraryId = freezed,Object? libraryTitle = freezed,Object? audioLanguage = freezed,Object? playlistItemId = freezed,Object? serverId = freezed,Object? serverName = freezed,Object? backendFolderKey = freezed,Object? raw = freezed,}) { +@override @pragma('vm:prefer-inline') $Res call({Object? dialect = null,Object? id = null,Object? kind = null,Object? guid = freezed,Object? title = freezed,Object? titleSort = freezed,Object? summary = freezed,Object? tagline = freezed,Object? originalTitle = freezed,Object? studio = freezed,Object? year = freezed,Object? originallyAvailableAt = freezed,Object? contentRating = freezed,Object? parentId = freezed,Object? parentTitle = freezed,Object? parentThumbPath = freezed,Object? parentIndex = freezed,Object? index = freezed,Object? grandparentId = freezed,Object? grandparentTitle = freezed,Object? grandparentThumbPath = freezed,Object? grandparentArtPath = freezed,Object? grandparentBackdropPaths = freezed,Object? thumbPath = freezed,Object? artPath = freezed,Object? backdropPaths = freezed,Object? clearLogoPath = freezed,Object? backgroundSquarePath = freezed,Object? durationMs = freezed,Object? viewOffsetMs = freezed,Object? viewCount = freezed,Object? lastViewedAt = freezed,Object? leafCount = freezed,Object? viewedLeafCount = freezed,Object? childCount = freezed,Object? addedAt = freezed,Object? updatedAt = freezed,Object? rating = freezed,Object? userRating = freezed,Object? ratings = freezed,Object? isFavorite = freezed,Object? genres = freezed,Object? directors = freezed,Object? writers = freezed,Object? producers = freezed,Object? countries = freezed,Object? collections = freezed,Object? labels = freezed,Object? styles = freezed,Object? moods = freezed,Object? roles = freezed,Object? mediaVersions = freezed,Object? libraryId = freezed,Object? libraryTitle = freezed,Object? playlistItemId = freezed,Object? serverId = freezed,Object? serverName = freezed,Object? backendFolderKey = freezed,Object? raw = freezed,}) { return _then(JellyfinMediaItem( dialect: null == dialect ? _self.dialect : dialect // ignore: cast_nullable_to_non_nullable as MediaBrowserDialect,id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable @@ -630,7 +624,6 @@ as List?,roles: freezed == roles ? _self.roles : roles // ignore: cast_n as List?,mediaVersions: freezed == mediaVersions ? _self.mediaVersions : mediaVersions // ignore: cast_nullable_to_non_nullable as List?,libraryId: freezed == libraryId ? _self.libraryId : libraryId // ignore: cast_nullable_to_non_nullable as String?,libraryTitle: freezed == libraryTitle ? _self.libraryTitle : libraryTitle // ignore: cast_nullable_to_non_nullable -as String?,audioLanguage: freezed == audioLanguage ? _self.audioLanguage : audioLanguage // ignore: cast_nullable_to_non_nullable as String?,playlistItemId: freezed == playlistItemId ? _self.playlistItemId : playlistItemId // ignore: cast_nullable_to_non_nullable as String?,serverId: freezed == serverId ? _self.serverId : serverId // ignore: cast_nullable_to_non_nullable as String?,serverName: freezed == serverName ? _self.serverName : serverName // ignore: cast_nullable_to_non_nullable diff --git a/lib/media/media_item.g.dart b/lib/media/media_item.g.dart index ee4ac5469..16308ea09 100644 --- a/lib/media/media_item.g.dart +++ b/lib/media/media_item.g.dart @@ -67,8 +67,6 @@ PlexMediaItem _$PlexMediaItemFromJson(Map json) => mediaVersions: _mediaItemVersionsFromJson(json['mediaVersions']), libraryId: json['libraryId'] as String?, libraryTitle: json['libraryTitle'] as String?, - audioLanguage: json['audioLanguage'] as String?, - subtitleLanguage: json['subtitleLanguage'] as String?, trailerKey: json['trailerKey'] as String?, playlistItemId: flexibleInt(json['playlistItemId']), playQueueItemId: flexibleInt(json['playQueueItemId']), @@ -135,8 +133,6 @@ Map _$PlexMediaItemToJson(PlexMediaItem instance) => 'mediaVersions': ?instance.mediaVersions?.map((e) => e.toJson()).toList(), 'libraryId': ?instance.libraryId, 'libraryTitle': ?instance.libraryTitle, - 'audioLanguage': ?instance.audioLanguage, - 'subtitleLanguage': ?instance.subtitleLanguage, 'trailerKey': ?instance.trailerKey, 'playlistItemId': ?instance.playlistItemId, 'playQueueItemId': ?instance.playQueueItemId, @@ -207,7 +203,6 @@ JellyfinMediaItem _$JellyfinMediaItemFromJson(Map json) => mediaVersions: _mediaItemVersionsFromJson(json['mediaVersions']), libraryId: json['libraryId'] as String?, libraryTitle: json['libraryTitle'] as String?, - audioLanguage: json['audioLanguage'] as String?, playlistItemId: json['playlistItemId'] as String?, serverId: json['serverId'] as String?, serverName: json['serverName'] as String?, @@ -270,7 +265,6 @@ Map _$JellyfinMediaItemToJson(JellyfinMediaItem instance) => 'mediaVersions': ?instance.mediaVersions?.map((e) => e.toJson()).toList(), 'libraryId': ?instance.libraryId, 'libraryTitle': ?instance.libraryTitle, - 'audioLanguage': ?instance.audioLanguage, 'playlistItemId': ?instance.playlistItemId, 'serverId': ?instance.serverId, 'serverName': ?instance.serverName, diff --git a/lib/services/jellyfin_mappers.dart b/lib/services/jellyfin_mappers.dart index 9bceac0ea..08556a0ae 100644 --- a/lib/services/jellyfin_mappers.dart +++ b/lib/services/jellyfin_mappers.dart @@ -292,7 +292,6 @@ class JellyfinMappers { // stamps — scoped search, the Ancestors lookup, caller passthrough. libraryId: null, libraryTitle: null, - audioLanguage: item['PreferredMetadataLanguage'] as String?, // Only present when the item came out of `/Playlists/{id}/Items`; the // playlist write endpoints address rows by this id, not the media id. playlistItemId: item['PlaylistItemId'] as String?, diff --git a/lib/services/plex_mappers.dart b/lib/services/plex_mappers.dart index 5c71b6448..c04f9454c 100644 --- a/lib/services/plex_mappers.dart +++ b/lib/services/plex_mappers.dart @@ -650,10 +650,6 @@ class PlexMetadataDto { final List? format; @JsonKey(name: 'Subformat', fromJson: _tagListFromJson, includeToJson: false) final List? subformat; - final String? audioLanguage; - final String? subtitleLanguage; - @JsonKey(fromJson: flexibleInt) - final int? subtitleMode; @JsonKey(fromJson: flexibleInt) final int? playlistItemID; @JsonKey(fromJson: flexibleInt) @@ -733,9 +729,6 @@ class PlexMetadataDto { this.mood, this.format, this.subformat, - this.audioLanguage, - this.subtitleLanguage, - this.subtitleMode, this.playlistItemID, this.playQueueItemID, this.librarySectionID, @@ -860,9 +853,6 @@ class PlexMetadataDto { List? mood, List? format, List? subformat, - String? audioLanguage, - String? subtitleLanguage, - int? subtitleMode, int? playlistItemID, int? playQueueItemID, int? librarySectionID, @@ -934,9 +924,6 @@ class PlexMetadataDto { mood: mood ?? this.mood, format: format ?? this.format, subformat: subformat ?? this.subformat, - audioLanguage: audioLanguage ?? this.audioLanguage, - subtitleLanguage: subtitleLanguage ?? this.subtitleLanguage, - subtitleMode: subtitleMode ?? this.subtitleMode, playlistItemID: playlistItemID ?? this.playlistItemID, playQueueItemID: playQueueItemID ?? this.playQueueItemID, librarySectionID: librarySectionID ?? this.librarySectionID, @@ -1141,8 +1128,6 @@ class PlexMappers { mediaVersions: dto.mediaVersions?.map(mediaVersion).toList(), libraryId: dto.librarySectionID?.toString(), libraryTitle: dto.librarySectionTitle, - audioLanguage: dto.audioLanguage, - subtitleLanguage: dto.subtitleLanguage, trailerKey: dto.primaryExtraKey, playlistItemId: dto.playlistItemID, playQueueItemId: dto.playQueueItemID, diff --git a/lib/services/plex_mappers.g.dart b/lib/services/plex_mappers.g.dart index 4bf0786b0..69d7f844b 100644 --- a/lib/services/plex_mappers.g.dart +++ b/lib/services/plex_mappers.g.dart @@ -146,9 +146,6 @@ PlexMetadataDto _$PlexMetadataDtoFromJson(Map json) => mood: _tagListFromJson(json['Mood']), format: _tagListFromJson(json['Format']), subformat: _tagListFromJson(json['Subformat']), - audioLanguage: json['audioLanguage'] as String?, - subtitleLanguage: json['subtitleLanguage'] as String?, - subtitleMode: flexibleInt(json['subtitleMode']), playlistItemID: flexibleInt(json['playlistItemID']), playQueueItemID: flexibleInt(json['playQueueItemID']), librarySectionID: flexibleInt(json['librarySectionID']), @@ -206,9 +203,6 @@ Map _$PlexMetadataDtoToJson(PlexMetadataDto instance) => 'viewedLeafCount': ?instance.viewedLeafCount, 'childCount': ?instance.childCount, 'imdbRatingCount': ?instance.imdbRatingCount, - 'audioLanguage': ?instance.audioLanguage, - 'subtitleLanguage': ?instance.subtitleLanguage, - 'subtitleMode': ?instance.subtitleMode, 'playlistItemID': ?instance.playlistItemID, 'playQueueItemID': ?instance.playQueueItemID, 'librarySectionID': ?instance.librarySectionID, diff --git a/lib/services/track_selection_service.dart b/lib/services/track_selection_service.dart index 659fca7bb..7e7d13622 100644 --- a/lib/services/track_selection_service.dart +++ b/lib/services/track_selection_service.dart @@ -661,14 +661,16 @@ bool _titlesMatch(String? mpvTitle, String? plexTitle, String? plexDisplayTitle) int _mediaTrackStreamIndex(int id, int? index) => index ?? id; -/// Priority levels for track selection +/// Priority levels for track selection. Per-item language overrides are not a +/// level: every backend folds them into the source's selected/default stream, +/// so an item-level language would only ever override the account preference +/// with something the server had already rejected. enum TrackSelectionPriority { navigation, // Priority 1: User's manual selection from previous episode serverSelected, // Priority 2: server's pre-selected track - perMedia, // Priority 3: Per-media language preference - profile, // Priority 4: User profile preferences - defaultTrack, // Priority 5: Default or first track - off, // Priority 6: Subtitles off (subtitle only) + profile, // Priority 3: User profile preferences + defaultTrack, // Priority 4: Default or first track + off, // Priority 5: Subtitles off (subtitle only) } /// Result of track selection including the selected track and which priority was used @@ -680,7 +682,7 @@ class TrackSelectionResult { } /// Service for selecting and applying audio and subtitle tracks based on -/// preferences, user profiles, and per-media settings. +/// carried selections, server-selected streams, and account preferences. class TrackSelectionService { final Player? player; final MediaServerUserProfile? profileSettings; @@ -948,9 +950,8 @@ class TrackSelectionService { /// Select the best audio track based on priority: /// Priority 1: Preferred track from navigation /// Priority 2: Server-selected track from media info - /// Priority 3: Per-media language preference - /// Priority 4: User profile preferences - /// Priority 5: Default or first track + /// Priority 3: User profile preferences + /// Priority 4: Default or first track TrackSelectionResult? selectAudioTrack( List availableTracks, AudioTrack? preferredAudioTrack, @@ -1021,18 +1022,7 @@ class TrackSelectionService { } } - // Priority 3: Try per-media language preference - if (metadata.audioLanguage != null) { - final matchedTrack = availableTracks.firstWhere( - (track) => languageMatches(track.language, metadata.audioLanguage), - orElse: () => availableTracks.first, - ); - if (languageMatches(matchedTrack.language, metadata.audioLanguage)) { - return TrackSelectionResult(matchedTrack, TrackSelectionPriority.perMedia); - } - } - - // Priority 4: Try user profile preferences + // Priority 3: Try user profile preferences if (profileSettings != null) { trackToSelect = findAudioTrackByProfile(availableTracks, profileSettings!); if (trackToSelect != null) { @@ -1040,7 +1030,7 @@ class TrackSelectionService { } } - // Priority 5: Use default or first track + // Priority 4: Use default or first track trackToSelect = availableTracks.firstWhere((t) => t.isDefault, orElse: () => availableTracks.first); return TrackSelectionResult(trackToSelect, TrackSelectionPriority.defaultTrack); } diff --git a/test/media/media_item_test.dart b/test/media/media_item_test.dart index 857578602..9f4d3f8fe 100644 --- a/test/media/media_item_test.dart +++ b/test/media/media_item_test.dart @@ -483,7 +483,6 @@ void main() { MediaRatingSource(source: 'rottenTomatoesCritic', value: 9.4), MediaRatingSource(source: 'imdb', value: 8.9, votes: 1200), ], - subtitleLanguage: 'eng', trailerKey: '/library/metadata/1', playlistItemId: 42, playQueueItemId: 7, @@ -495,7 +494,6 @@ void main() { expect(copy.editionTitle, 'Director Cut'); expect(copy.ratings?.map((rating) => rating.source), ['rottenTomatoesCritic', 'imdb']); expect(copy.ratings?.last.votes, 1200); - expect(copy.subtitleLanguage, 'eng'); expect(copy.trailerKey, '/library/metadata/1'); expect(copy.playlistItemId, 42); expect(copy.playQueueItemId, 7); @@ -547,7 +545,6 @@ void main() { parts: [MediaPart(id: 'part1', streamPath: '/stream', sizeBytes: 1000)], ), ], - subtitleLanguage: 'eng', trailerKey: '/trailer', playlistItemId: 4, playQueueItemId: 5, @@ -567,7 +564,6 @@ void main() { expect(plex.genres, ['Drama']); expect(plex.roles?.single.tag, 'Actor'); expect(plex.mediaVersions?.single.parts.single.streamPath, '/stream'); - expect(plex.subtitleLanguage, 'eng'); expect(plex.trailerKey, '/trailer'); expect(plex.playlistItemId, 4); expect(plex.playQueueItemId, 5); diff --git a/test/services/track_selection_service_test.dart b/test/services/track_selection_service_test.dart index b9a2bd995..076cbe2ed 100644 --- a/test/services/track_selection_service_test.dart +++ b/test/services/track_selection_service_test.dart @@ -14,14 +14,8 @@ import '../test_helpers/media_items.dart'; // including fallback and ambiguity rules. `selectAndApplyTracks` is excluded // because it requires a real Player and SettingsService singleton. -MediaItem _meta({MediaBackend backend = MediaBackend.plex, String? audioLanguage, String? subtitleLanguage}) => - testMediaItem( - id: 'rk1', - backend: backend, - kind: MediaKind.movie, - audioLanguage: audioLanguage, - subtitleLanguage: subtitleLanguage, - ); +MediaItem _meta({MediaBackend backend = MediaBackend.plex}) => + testMediaItem(id: 'rk1', backend: backend, kind: MediaKind.movie); AccountPreferences _profile({ bool autoSelectAudio = true, @@ -373,15 +367,7 @@ void main() { expect(result.track.language, 'fre'); }); - test('Priority 3: per-media audioLanguage from metadata', () { - final tracks = [_audio('A', lang: 'eng'), _audio('B', lang: 'fre')]; - final result = _svc(metadata: _meta(audioLanguage: 'fre')).selectAudioTrack(tracks, null); - expect(result, isNotNull); - expect(result!.priority, TrackSelectionPriority.perMedia); - expect(result.track.language, 'fre'); - }); - - test('Priority 4: user profile when nothing higher matches', () { + test('Priority 3: user profile when nothing higher matches', () { final tracks = [_audio('A', lang: 'eng'), _audio('B', lang: 'fre')]; final profile = _profile(defaultAudioLanguage: 'eng'); final result = _svc(profile: profile).selectAudioTrack(tracks, null); @@ -390,7 +376,7 @@ void main() { expect(result.track.language, 'eng'); }); - test('Priority 5: default-flagged track as last resort', () { + test('Priority 4: default-flagged track as last resort', () { final tracks = [_audio('A', lang: 'eng'), _audio('B', lang: 'fre', isDefault: true)]; final result = _svc().selectAudioTrack(tracks, null); expect(result, isNotNull); @@ -398,7 +384,7 @@ void main() { expect(result.track.id, 'B'); }); - test('Priority 5: first track when none flagged default', () { + test('Priority 4: first track when none flagged default', () { final tracks = [_audio('A', lang: 'eng'), _audio('B', lang: 'fre')]; final result = _svc().selectAudioTrack(tracks, null); expect(result, isNotNull); @@ -408,7 +394,7 @@ void main() { test('preferred mismatch falls through to lower priority', () { // preferred has a language that is NOT in the available tracks — Priority 1 - // misses; Priority 5 picks the first track. + // misses; Priority 4 picks the first track. final tracks = [_audio('A', lang: 'eng'), _audio('B', lang: 'fre')]; final result = _svc().selectAudioTrack(tracks, _audio('Z', lang: 'jpn')); expect(result, isNotNull); diff --git a/test/test_helpers/media_items.dart b/test/test_helpers/media_items.dart index 8c6e8e642..cc2394e64 100644 --- a/test/test_helpers/media_items.dart +++ b/test/test_helpers/media_items.dart @@ -63,8 +63,6 @@ MediaItem testMediaItem({ List? mediaVersions, String? libraryId, String? libraryTitle, - String? audioLanguage, - String? subtitleLanguage, String? serverId, String? serverName, String? backendFolderKey, @@ -129,8 +127,6 @@ MediaItem testMediaItem({ mediaVersions: mediaVersions, libraryId: libraryId, libraryTitle: libraryTitle, - audioLanguage: audioLanguage, - subtitleLanguage: subtitleLanguage, serverId: serverId, serverName: serverName, backendFolderKey: backendFolderKey, @@ -190,7 +186,6 @@ MediaItem testMediaItem({ mediaVersions: mediaVersions, libraryId: libraryId, libraryTitle: libraryTitle, - audioLanguage: audioLanguage, serverId: serverId, serverName: serverName, backendFolderKey: backendFolderKey,