mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
relaxed image check
don't use fetch here - it doesn't work
This commit is contained in:
@@ -23,12 +23,12 @@ export const getMoviePosters = (movieName, language = 'en') => {
|
|||||||
export const checkImageURL = async url => {
|
export const checkImageURL = async url => {
|
||||||
if (!url || !url.match(/.(jpg|jpeg|png|gif)$/i)) return false
|
if (!url || !url.match(/.(jpg|jpeg|png|gif)$/i)) return false
|
||||||
|
|
||||||
try {
|
// try {
|
||||||
await fetch(url, { mode: 'no-cors' })
|
// await fetch(url, { mode: 'no-cors' })
|
||||||
return true
|
return true
|
||||||
} catch (e) {
|
// } catch (e) {
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
const magnetRegex = /^magnet:\?xt=urn:[a-z0-9].*/i
|
const magnetRegex = /^magnet:\?xt=urn:[a-z0-9].*/i
|
||||||
|
|||||||
Reference in New Issue
Block a user