From 74d31f4fad05a13846eee6ed8d1d6a4c849309fd Mon Sep 17 00:00:00 2001 From: Jip Fr Date: Sat, 30 Dec 2023 12:45:10 +0100 Subject: [PATCH 1/3] Fix always success --- src/hooks/useProviderScrape.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hooks/useProviderScrape.tsx b/src/hooks/useProviderScrape.tsx index 7e1ab4bf..43328184 100644 --- a/src/hooks/useProviderScrape.tsx +++ b/src/hooks/useProviderScrape.tsx @@ -63,7 +63,8 @@ function useBaseScrape() { const lastIdTmp = lastId.current; setSources((s) => { 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 }; }); setCurrentSource(id); From d97659ae24e3d5f0e95c5ae2dd1ff6101f47067c Mon Sep 17 00:00:00 2001 From: Jip Fr Date: Sat, 30 Dec 2023 12:54:15 +0100 Subject: [PATCH 2/3] Bump version (no more funny number) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dd1c6000..45d5203e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "movie-web", - "version": "4.2.0", + "version": "4.2.1", "private": true, "homepage": "https://movie-web.app", "scripts": { From a1a7ab024ac86ab4fdcdf48f586588be7eec4943 Mon Sep 17 00:00:00 2001 From: mrjvs Date: Sat, 30 Dec 2023 12:59:56 +0100 Subject: [PATCH 3/3] Fix error dialog --- src/pages/parts/player/ScrapeErrorPart.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/parts/player/ScrapeErrorPart.tsx b/src/pages/parts/player/ScrapeErrorPart.tsx index 75526ca2..127a69a6 100644 --- a/src/pages/parts/player/ScrapeErrorPart.tsx +++ b/src/pages/parts/player/ScrapeErrorPart.tsx @@ -37,7 +37,7 @@ export function ScrapeErrorPart(props: ScrapeErrorPartProps) { if (v.reason) str += `${v.reason}\n`; if (v.error?.message) str += `${v.error.name ?? "unknown"}: ${v.error.message}\n`; - if (v.error) str += `${v.error.toString()}\n`; + else if (v.error) str += `${v.error.toString()}\n`; }); return str; }, [props, location]);