mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 12:54:38 +03:00
Xpath scraping from URL (#285)
* Add xpath performer and scene scraping * Add studio scraping * Refactor code * Fix compile error * Don't overwrite performer URL during a scrape
This commit is contained in:
15
vendor/github.com/antchfx/xpath/func_pre_go110.go
generated
vendored
Normal file
15
vendor/github.com/antchfx/xpath/func_pre_go110.go
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
// +build !go1.10
|
||||
|
||||
package xpath
|
||||
|
||||
import "math"
|
||||
|
||||
// math.Round() is supported by Go 1.10+,
|
||||
// This method just compatible for version <1.10.
|
||||
// https://github.com/golang/go/issues/20100
|
||||
func round(f float64) int {
|
||||
if math.Abs(f) < 0.5 {
|
||||
return 0
|
||||
}
|
||||
return int(f + math.Copysign(0.5, f))
|
||||
}
|
||||
Reference in New Issue
Block a user