- Cleaup the code
- Add delete button to webdav ui - Some other bug fixes here and there
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"sync"
|
||||
)
|
||||
|
||||
@@ -327,9 +328,12 @@ func (c *Config) setDefaults() {
|
||||
c.URLBase = "/"
|
||||
}
|
||||
// validate url base starts with /
|
||||
if c.URLBase[0] != '/' {
|
||||
if !strings.HasPrefix(c.URLBase, "/") {
|
||||
c.URLBase = "/" + c.URLBase
|
||||
}
|
||||
if !strings.HasSuffix(c.URLBase, "/") {
|
||||
c.URLBase += "/"
|
||||
}
|
||||
|
||||
// Load the auth file
|
||||
c.Auth = c.GetAuth()
|
||||
|
||||
@@ -10,7 +10,6 @@ type Debouncer[T any] struct {
|
||||
timer *time.Timer
|
||||
interval time.Duration
|
||||
caller func(arg T)
|
||||
arg T
|
||||
}
|
||||
|
||||
func NewDebouncer[T any](interval time.Duration, caller func(arg T)) *Debouncer[T] {
|
||||
|
||||
@@ -13,8 +13,6 @@ var (
|
||||
)
|
||||
|
||||
var (
|
||||
videoRegex = regexp.MustCompile(videoMatch)
|
||||
musicRegex = regexp.MustCompile(musicMatch)
|
||||
mediaRegex = regexp.MustCompile(videoMatch + "|" + musicMatch)
|
||||
sampleRegex = regexp.MustCompile(sampleMatch)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user