mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
fix: correct notification sending for wrong status (#4113)
This commit is contained in:
@@ -58,14 +58,17 @@ export class MediaRequestSubscriber
|
|||||||
// Find all seasons in the related media entity
|
// Find all seasons in the related media entity
|
||||||
// and see if they are available, then we can check
|
// and see if they are available, then we can check
|
||||||
// if the request contains the same seasons
|
// if the request contains the same seasons
|
||||||
const isMediaAvailable = entity.media.seasons
|
const availableSeasons = entity.media.seasons.filter(
|
||||||
.filter(
|
(season) =>
|
||||||
(season) =>
|
season[entity.is4k ? 'status4k' : 'status'] === MediaStatus.AVAILABLE
|
||||||
season[entity.is4k ? 'status4k' : 'status'] === MediaStatus.AVAILABLE
|
);
|
||||||
)
|
|
||||||
.every((seasonRequest) =>
|
const isMediaAvailable =
|
||||||
entity.seasons.find(
|
availableSeasons.length > 0 &&
|
||||||
(season) => season.seasonNumber === seasonRequest.seasonNumber
|
availableSeasons.every((availableSeason) =>
|
||||||
|
entity.seasons?.some(
|
||||||
|
(entitySeason) =>
|
||||||
|
entitySeason.seasonNumber === availableSeason.seasonNumber
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user