mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-20 14:06:09 +05:00
migrate
This commit is contained in:
@@ -2,20 +2,9 @@ package utils
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func CleanFName(file string) string {
|
||||
re := regexp.MustCompile(`[ !*'();:@&=+$,/?#\[\]~"{}]`)
|
||||
ret := re.ReplaceAllString(file, `_`)
|
||||
ret = strings.Replace(ret, "__", "_", -1)
|
||||
ret = strings.Replace(ret, "._", "_", -1)
|
||||
ret = strings.Replace(ret, "_.", ".", -1)
|
||||
return ret
|
||||
}
|
||||
|
||||
const (
|
||||
_ = 1.0 << (10 * iota) // ignore first value by assigning to blank identifier
|
||||
KB
|
||||
|
||||
Reference in New Issue
Block a user