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(
|
for (const mediaItem of unavailableItems) {
|
||||||
unavailableItems.map(async (mediaItem) => {
|
|
||||||
try {
|
try {
|
||||||
logger.info("Creating media request from user's Plex Watchlist", {
|
logger.info("Creating media request from user's Plex Watchlist", {
|
||||||
label: 'Watchlist Sync',
|
label: 'Watchlist Sync',
|
||||||
@@ -108,7 +107,7 @@ class WatchlistSync {
|
|||||||
!user.settings?.watchlistSyncTv) &&
|
!user.settings?.watchlistSyncTv) &&
|
||||||
mediaItem.type === 'show')
|
mediaItem.type === 'show')
|
||||||
) {
|
) {
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
await MediaRequest.request(
|
await MediaRequest.request(
|
||||||
@@ -125,7 +124,7 @@ class WatchlistSync {
|
|||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (!(e instanceof Error)) {
|
if (!(e instanceof Error)) {
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (e.constructor) {
|
switch (e.constructor) {
|
||||||
@@ -153,8 +152,7 @@ class WatchlistSync {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user