mirror of
https://github.com/movie-web/movie-web.git
synced 2024-11-13 11:55:05 +01:00
Merge pull request #661 from movie-web/suffering-from-success
Fix provider status being set to success even on failure
This commit is contained in:
commit
ee7df0a109
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "movie-web",
|
"name": "movie-web",
|
||||||
"version": "4.2.0",
|
"version": "4.2.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"homepage": "https://movie-web.app",
|
"homepage": "https://movie-web.app",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -63,7 +63,8 @@ function useBaseScrape() {
|
|||||||
const lastIdTmp = lastId.current;
|
const lastIdTmp = lastId.current;
|
||||||
setSources((s) => {
|
setSources((s) => {
|
||||||
if (s[id]) s[id].status = "pending";
|
if (s[id]) s[id].status = "pending";
|
||||||
if (lastIdTmp && s[lastIdTmp]) s[lastIdTmp].status = "success";
|
if (lastIdTmp && s[lastIdTmp] && s[lastIdTmp].status === "pending")
|
||||||
|
s[lastIdTmp].status = "success";
|
||||||
return { ...s };
|
return { ...s };
|
||||||
});
|
});
|
||||||
setCurrentSource(id);
|
setCurrentSource(id);
|
||||||
|
Loading…
Reference in New Issue
Block a user