mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-09 19:47:47 +08:00
fix: no pre path
This commit is contained in:
4
db/db.go
4
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).
|
||||
|
||||
Reference in New Issue
Block a user