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 ...media.seasons
.filter( .filter(
(season) => (season) =>
season[requestBody.is4k ? 'status4k' : 'status'] === season[requestBody.is4k ? 'status4k' : 'status'] !==
MediaStatus.AVAILABLE || MediaStatus.UNKNOWN
season[requestBody.is4k ? 'status4k' : 'status'] ===
MediaStatus.PARTIALLY_AVAILABLE
) )
.map((season) => season.seasonNumber), .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) { private async syncUserWatchlist(user: User) {

Loading…
Cancel
Save