Skip to content

Commit

Permalink
refactor: for loops
Browse files Browse the repository at this point in the history
  • Loading branch information
bonswouar committed Dec 8, 2024
1 parent 7e9d84d commit b9ff7d4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/lib/scanners/baseScanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -671,16 +671,16 @@ class BaseScanner<T> {
.getMany();

if (existingRequests && existingRequests.length > 0) {
existingRequests.forEach((existingRequest) => {
existingRequest.seasons.forEach(async (requestedSeason) => {
for (const existingRequest of existingRequests) {
for (const requestedSeason of existingRequest.seasons) {
if (requestedSeason.seasonNumber === season.seasonNumber) {
this.log(
`Removing request for Season ${season.seasonNumber} of tmdbId ${tmdbId} as it is unmonitored`
);
await seasonRequestRepository.remove(requestedSeason);
}
});
});
}
}
}
}
}
Expand Down

0 comments on commit b9ff7d4

Please sign in to comment.