This commit is contained in:
Simon Ding
2025-04-29 15:55:11 +08:00
parent 3eb1f37387
commit 3a73d0c33e
4 changed files with 19 additions and 8 deletions

View File

@@ -390,11 +390,13 @@ type WebdavSetting struct {
}
func (c *client) AddStorage(st *StorageInfo) error {
if !strings.HasSuffix(st.TvPath, "/") {
st.TvPath += "/"
}
if !strings.HasSuffix(st.MoviePath, "/") {
st.MoviePath += "/"
if st.Implementation != storage.ImplementationLocal.String() { //add seperator if not local storage
if !strings.HasSuffix(st.TvPath, "/") {
st.TvPath += "/"
}
if !strings.HasSuffix(st.MoviePath, "/") {
st.MoviePath += "/"
}
}
if st.Settings == nil {
st.Settings = map[string]string{}