relaxed image check

don't use fetch here - it doesn't work
This commit is contained in:
nikk gitanes
2021-08-10 09:33:08 +03:00
parent 136b3523b4
commit ef8bc07f57

View File

@@ -23,12 +23,12 @@ export const getMoviePosters = (movieName, language = 'en') => {
export const checkImageURL = async url => {
if (!url || !url.match(/.(jpg|jpeg|png|gif)$/i)) return false
try {
await fetch(url, { mode: 'no-cors' })
// try {
// await fetch(url, { mode: 'no-cors' })
return true
} catch (e) {
return false
}
// } catch (e) {
// return false
// }
}
const magnetRegex = /^magnet:\?xt=urn:[a-z0-9].*/i