diff --git a/packages/frontend/src/components/menu/addons.tsx b/packages/frontend/src/components/menu/addons.tsx index 2f629d7d..6db65953 100644 --- a/packages/frontend/src/components/menu/addons.tsx +++ b/packages/frontend/src/components/menu/addons.tsx @@ -606,13 +606,14 @@ function SortableAddonItem({ const handleManifestUpdate = async (e: React.FormEvent) => { e.preventDefault(); + const standardisedManifest = standardiseManifestUrl(newManifestUrl); if (!newManifestUrl) { toast.error('Please enter a new manifest URL'); return; } const regex = /^(https?|stremio):\/\/.+\/manifest\.json$/; - if (!regex.test(newManifestUrl)) { + if (!regex.test(standardisedManifest)) { toast.error('Please enter a valid manifest URL'); return; } @@ -620,7 +621,7 @@ function SortableAddonItem({ // attempt to fetch the manifest try { setLoading(true); - const response = await fetch(newManifestUrl); + const response = await fetch(standardisedManifest); if (!response.ok) { throw new Error(`${response.status} ${response.statusText}`); } @@ -639,7 +640,7 @@ function SortableAddonItem({ ...p, options: { ...p.options, - manifestUrl: newManifestUrl, + manifestUrl: standardisedManifest, }, } : p @@ -671,7 +672,7 @@ function SortableAddonItem({