allow http links in source

This commit is contained in:
nikk gitanes
2021-07-29 17:15:11 +03:00
parent 6f1df57210
commit 586acad357
2 changed files with 10 additions and 5 deletions

View File

@@ -14,7 +14,7 @@ import { getTorrents } from 'utils/Utils'
import parseTorrent from 'parse-torrent'
import { ButtonWrapper, Header } from 'style/DialogStyles'
import { checkImageURL, getMoviePosters, chechTorrentSource, parseTorrentTitle } from './helpers'
import { checkImageURL, getMoviePosters, checkTorrentSource, parseTorrentTitle } from './helpers'
import { Content } from './style'
import RightSideComponent from './RightSideComponent'
import LeftSideComponent from './LeftSideComponent'
@@ -147,7 +147,7 @@ export default function AddDialog({
const prevTorrentSourceState = usePreviousState(torrentSource)
useEffect(() => {
const isCorrectSource = chechTorrentSource(torrentSource)
const isCorrectSource = checkTorrentSource(torrentSource)
if (!isCorrectSource) return setIsTorrentSourceCorrect(false)
setIsTorrentSourceCorrect(true)
@@ -227,10 +227,10 @@ export default function AddDialog({
{!isEditMode && (
<LeftSideComponent
setIsUserInteractedWithPoster={setIsUserInteractedWithPoster}
selectedFile={selectedFile}
setSelectedFile={setSelectedFile}
torrentSource={torrentSource}
setTorrentSource={setTorrentSource}
selectedFile={selectedFile}
/>
)}