mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Configuration
* Added flags to customize the host and port * Start up just one server rather than a server for HTTP and HTTPS. HTTPS server will only start if a cert and key are found
This commit is contained in:
@@ -12,7 +12,9 @@ func GetTimeFromRegex(str string) float64 {
|
||||
regexResult := TimeRegex.FindStringSubmatch(str)
|
||||
|
||||
// Bail early if we don't have the results we expect
|
||||
if len(regexResult) != 4 { return 0 }
|
||||
if len(regexResult) != 4 {
|
||||
return 0
|
||||
}
|
||||
|
||||
h, _ := strconv.ParseFloat(regexResult[1], 64)
|
||||
m, _ := strconv.ParseFloat(regexResult[2], 64)
|
||||
@@ -27,8 +29,10 @@ func GetFrameFromRegex(str string) int {
|
||||
regexResult := FrameRegex.FindStringSubmatch(str)
|
||||
|
||||
// Bail early if we don't have the results we expect
|
||||
if len(regexResult) < 2 { return 0 }
|
||||
if len(regexResult) < 2 {
|
||||
return 0
|
||||
}
|
||||
|
||||
result, _ := strconv.Atoi(regexResult[1])
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user