mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2026-01-01 04:08:45 -05:00
fix: nullable type for jellyfinMediaId(4k) (#702)
The jellyfinMediaId(4k) properties were inferred as string | undefined, causing them to be set to undefined when assigning null. This prevented the media from being saved correctly to the SQLite database, as it doesn't accept undefined values. This resolves the availabilitySync job issue where the "play on" button wasn't being removed for all media server types. fix #668
This commit is contained in:
@@ -168,9 +168,9 @@ class JellyfinScanner {
|
||||
newMedia.jellyfinMediaId =
|
||||
hasOtherResolution || (!this.enable4kMovie && has4k)
|
||||
? metadata.Id
|
||||
: undefined;
|
||||
: null;
|
||||
newMedia.jellyfinMediaId4k =
|
||||
has4k && this.enable4kMovie ? metadata.Id : undefined;
|
||||
has4k && this.enable4kMovie ? metadata.Id : null;
|
||||
await mediaRepository.save(newMedia);
|
||||
this.log(`Saved ${metadata.Name}`);
|
||||
}
|
||||
@@ -461,9 +461,9 @@ class JellyfinScanner {
|
||||
tmdbId: tvShow.id,
|
||||
tvdbId: tvShow.external_ids.tvdb_id,
|
||||
mediaAddedAt: new Date(metadata.DateCreated ?? ''),
|
||||
jellyfinMediaId: isAllStandardSeasons ? Id : undefined,
|
||||
jellyfinMediaId: isAllStandardSeasons ? Id : null,
|
||||
jellyfinMediaId4k:
|
||||
isAll4kSeasons && this.enable4kShow ? Id : undefined,
|
||||
isAll4kSeasons && this.enable4kShow ? Id : null,
|
||||
status: isAllStandardSeasons
|
||||
? MediaStatus.AVAILABLE
|
||||
: newSeasons.some(
|
||||
|
||||
Reference in New Issue
Block a user