fix: filter out season requests that are not unknown status

feature/watchlist-sync
Ryan Cohen 2 years ago
parent c4e47ae763
commit 0bb6c65c28

@ -249,10 +249,8 @@ export class MediaRequest {
...media.seasons
.filter(
(season) =>
season[requestBody.is4k ? 'status4k' : 'status'] ===
MediaStatus.AVAILABLE ||
season[requestBody.is4k ? 'status4k' : 'status'] ===
MediaStatus.PARTIALLY_AVAILABLE
season[requestBody.is4k ? 'status4k' : 'status'] !==
MediaStatus.UNKNOWN
)
.map((season) => season.seasonNumber),
];

@ -26,7 +26,9 @@ class WatchlistSync {
},
});
Promise.all(users.map((user) => this.syncUserWatchlist(user)));
for (const user of users) {
await this.syncUserWatchlist(user);
}
}
private async syncUserWatchlist(user: User) {

Loading…
Cancel
Save