Compare commits
1 Commits
preview-li
...
fix-media-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e48f998a2b |
@@ -151,11 +151,11 @@ class Media {
|
|||||||
@Column({ nullable: true, type: 'varchar' })
|
@Column({ nullable: true, type: 'varchar' })
|
||||||
public ratingKey4k?: string | null;
|
public ratingKey4k?: string | null;
|
||||||
|
|
||||||
@Column({ nullable: true })
|
@Column({ nullable: true, type: 'varchar' })
|
||||||
public jellyfinMediaId?: string;
|
public jellyfinMediaId?: string | null;
|
||||||
|
|
||||||
@Column({ nullable: true })
|
@Column({ nullable: true, type: 'varchar' })
|
||||||
public jellyfinMediaId4k?: string;
|
public jellyfinMediaId4k?: string | null;
|
||||||
|
|
||||||
public serviceUrl?: string;
|
public serviceUrl?: string;
|
||||||
public serviceUrl4k?: string;
|
public serviceUrl4k?: string;
|
||||||
|
|||||||
@@ -548,7 +548,7 @@ class AvailabilitySync {
|
|||||||
media[is4k ? 'ratingKey4k' : 'ratingKey'] =
|
media[is4k ? 'ratingKey4k' : 'ratingKey'] =
|
||||||
mediaStatus === MediaStatus.PROCESSING
|
mediaStatus === MediaStatus.PROCESSING
|
||||||
? media[is4k ? 'ratingKey4k' : 'ratingKey']
|
? media[is4k ? 'ratingKey4k' : 'ratingKey']
|
||||||
: undefined;
|
: null;
|
||||||
} else if (
|
} else if (
|
||||||
mediaServerType === MediaServerType.JELLYFIN ||
|
mediaServerType === MediaServerType.JELLYFIN ||
|
||||||
mediaServerType === MediaServerType.EMBY
|
mediaServerType === MediaServerType.EMBY
|
||||||
@@ -556,7 +556,7 @@ class AvailabilitySync {
|
|||||||
media[is4k ? 'jellyfinMediaId4k' : 'jellyfinMediaId'] =
|
media[is4k ? 'jellyfinMediaId4k' : 'jellyfinMediaId'] =
|
||||||
mediaStatus === MediaStatus.PROCESSING
|
mediaStatus === MediaStatus.PROCESSING
|
||||||
? media[is4k ? 'jellyfinMediaId4k' : 'jellyfinMediaId']
|
? media[is4k ? 'jellyfinMediaId4k' : 'jellyfinMediaId']
|
||||||
: undefined;
|
: null;
|
||||||
}
|
}
|
||||||
logger.info(
|
logger.info(
|
||||||
`The ${is4k ? '4K' : 'non-4K'} ${
|
`The ${is4k ? '4K' : 'non-4K'} ${
|
||||||
|
|||||||
@@ -168,9 +168,9 @@ class JellyfinScanner {
|
|||||||
newMedia.jellyfinMediaId =
|
newMedia.jellyfinMediaId =
|
||||||
hasOtherResolution || (!this.enable4kMovie && has4k)
|
hasOtherResolution || (!this.enable4kMovie && has4k)
|
||||||
? metadata.Id
|
? metadata.Id
|
||||||
: undefined;
|
: null;
|
||||||
newMedia.jellyfinMediaId4k =
|
newMedia.jellyfinMediaId4k =
|
||||||
has4k && this.enable4kMovie ? metadata.Id : undefined;
|
has4k && this.enable4kMovie ? metadata.Id : null;
|
||||||
await mediaRepository.save(newMedia);
|
await mediaRepository.save(newMedia);
|
||||||
this.log(`Saved ${metadata.Name}`);
|
this.log(`Saved ${metadata.Name}`);
|
||||||
}
|
}
|
||||||
@@ -461,9 +461,9 @@ class JellyfinScanner {
|
|||||||
tmdbId: tvShow.id,
|
tmdbId: tvShow.id,
|
||||||
tvdbId: tvShow.external_ids.tvdb_id,
|
tvdbId: tvShow.external_ids.tvdb_id,
|
||||||
mediaAddedAt: new Date(metadata.DateCreated ?? ''),
|
mediaAddedAt: new Date(metadata.DateCreated ?? ''),
|
||||||
jellyfinMediaId: isAllStandardSeasons ? Id : undefined,
|
jellyfinMediaId: isAllStandardSeasons ? Id : null,
|
||||||
jellyfinMediaId4k:
|
jellyfinMediaId4k:
|
||||||
isAll4kSeasons && this.enable4kShow ? Id : undefined,
|
isAll4kSeasons && this.enable4kShow ? Id : null,
|
||||||
status: isAllStandardSeasons
|
status: isAllStandardSeasons
|
||||||
? MediaStatus.AVAILABLE
|
? MediaStatus.AVAILABLE
|
||||||
: newSeasons.some(
|
: newSeasons.some(
|
||||||
|
|||||||
Reference in New Issue
Block a user