diff --git a/web/src/components/Add/AddDialog.jsx b/web/src/components/Add/AddDialog.jsx index f5649a8..01e146f 100644 --- a/web/src/components/Add/AddDialog.jsx +++ b/web/src/components/Add/AddDialog.jsx @@ -67,7 +67,10 @@ export default function AddDialog({ const allHashes = torrents.map(({ hash }) => hash) allHashes.includes(currentSourceHash) && handleClose() - }, [isSaving, torrents, currentSourceHash, handleClose]) + // FIXME! check api reply on add links + const linkRegex = /^(http(s?)):\/\/.*/i + torrentSource.match(linkRegex) !== null && handleClose() + }, [isSaving, torrents, torrentSource, currentSourceHash, handleClose]) const fullScreen = useMediaQuery('@media (max-width:930px)')