mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
regex fixed
This commit is contained in:
@@ -23,7 +23,7 @@ export const checkImageURL = async url => {
|
||||
}
|
||||
|
||||
const magnetRegex = /magnet:\?xt=urn:[a-z0-9]{20,50}/i
|
||||
const hashRegex = /\b[0-9a-f]{32}\b|\b[0-9a-f]{40}\b|\b[0-9a-f]{64}\b/i
|
||||
const hashRegex = /^\b[0-9a-f]{32}\b$|^\b[0-9a-f]{40}\b$|^\b[0-9a-f]{64}\b$/i
|
||||
const torrentRegex = /^.*\.(torrent)$/i
|
||||
export const chechTorrentSource = source =>
|
||||
source.match(hashRegex) !== null || source.match(magnetRegex) !== null || source.match(torrentRegex) !== null
|
||||
|
||||
Reference in New Issue
Block a user