This commit is contained in:
YouROK
2021-08-25 22:18:14 +03:00
parent c219e52429
commit 3420fa44ba
11 changed files with 341 additions and 17 deletions

19
server/dlna/utils.go Normal file
View File

@@ -0,0 +1,19 @@
package dlna
import (
"path/filepath"
)
func isHashPath(path string) bool {
base := filepath.Base(path)
if len(base) == 40 {
data := []byte(base)
for _, v := range data {
if !(v >= 48 && v <= 57 || v >= 65 && v <= 70 || v >= 97 && v <= 102) {
return false
}
}
return true
}
return false
}