From a465468b687116f6061303ea49c35adef9e74cbf Mon Sep 17 00:00:00 2001 From: Simon Ding Date: Sun, 14 Jul 2024 21:15:14 +0800 Subject: [PATCH] fix: no pre path --- db/db.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/db/db.go b/db/db.go index 550133a..1738860 100644 --- a/db/db.go +++ b/db/db.go @@ -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).