mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
add dlna
This commit is contained in:
19
server/dlna/utils.go
Normal file
19
server/dlna/utils.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user