mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Performer urls (#4958)
* Populate URLs from legacy fields * Return nil properly in xpath/json scrapers * Improve migration logging
This commit is contained in:
18
pkg/performer/url.go
Normal file
18
pkg/performer/url.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package performer
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
)
|
||||
|
||||
var (
|
||||
twitterURLRE = regexp.MustCompile(`^https?:\/\/(?:www\.)?twitter\.com\/`)
|
||||
instagramURLRE = regexp.MustCompile(`^https?:\/\/(?:www\.)?instagram\.com\/`)
|
||||
)
|
||||
|
||||
func IsTwitterURL(url string) bool {
|
||||
return twitterURLRE.MatchString(url)
|
||||
}
|
||||
|
||||
func IsInstagramURL(url string) bool {
|
||||
return instagramURLRE.MatchString(url)
|
||||
}
|
||||
Reference in New Issue
Block a user