mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-08 19:17:53 +08:00
fix
This commit is contained in:
12
db/db.go
12
db/db.go
@@ -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{}
|
||||
|
||||
Reference in New Issue
Block a user