fix: no pre path

This commit is contained in:
Simon Ding
2024-07-14 21:15:14 +08:00
parent 792a470e69
commit a465468b68

View File

@@ -5,7 +5,6 @@ import (
"encoding/json"
"fmt"
"os"
"path/filepath"
"polaris/ent"
"polaris/ent/downloadclients"
"polaris/ent/episode"
@@ -89,7 +88,6 @@ func (c *Client) AddWatchlist(storageId int, nameCn, nameEn string, detail *tmdb
storageId = r.ID
}
}
st := c.GetStorage(storageId)
targetDir := fmt.Sprintf("%s %s (%v)", nameCn, nameEn, strings.Split(detail.FirstAirDate, "-")[0])
if !utils.IsChineseChar(nameCn) {
@@ -97,8 +95,6 @@ func (c *Client) AddWatchlist(storageId int, nameCn, nameEn string, detail *tmdb
targetDir = fmt.Sprintf("%s (%v)", nameEn, strings.Split(detail.FirstAirDate, "-")[0])
}
targetDir = filepath.Join(st.GetPath(), targetDir)
r, err := c.ent.Series.Create().
SetTmdbID(int(detail.ID)).
SetStorageID(storageId).