mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
fix: request watchlist items sequentially to prevent bypassing quota (#3667)
This commit is contained in:
@@ -79,8 +79,7 @@ class WatchlistSync {
|
||||
)
|
||||
);
|
||||
|
||||
await Promise.all(
|
||||
unavailableItems.map(async (mediaItem) => {
|
||||
for (const mediaItem of unavailableItems) {
|
||||
try {
|
||||
logger.info("Creating media request from user's Plex Watchlist", {
|
||||
label: 'Watchlist Sync',
|
||||
@@ -108,7 +107,7 @@ class WatchlistSync {
|
||||
!user.settings?.watchlistSyncTv) &&
|
||||
mediaItem.type === 'show')
|
||||
) {
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
|
||||
await MediaRequest.request(
|
||||
@@ -125,7 +124,7 @@ class WatchlistSync {
|
||||
);
|
||||
} catch (e) {
|
||||
if (!(e instanceof Error)) {
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (e.constructor) {
|
||||
@@ -153,8 +152,7 @@ class WatchlistSync {
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user