mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-26 02:34:58 +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"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
|
||||||
"polaris/ent"
|
"polaris/ent"
|
||||||
"polaris/ent/downloadclients"
|
"polaris/ent/downloadclients"
|
||||||
"polaris/ent/episode"
|
"polaris/ent/episode"
|
||||||
@@ -89,7 +88,6 @@ func (c *Client) AddWatchlist(storageId int, nameCn, nameEn string, detail *tmdb
|
|||||||
storageId = r.ID
|
storageId = r.ID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
st := c.GetStorage(storageId)
|
|
||||||
|
|
||||||
targetDir := fmt.Sprintf("%s %s (%v)", nameCn, nameEn, strings.Split(detail.FirstAirDate, "-")[0])
|
targetDir := fmt.Sprintf("%s %s (%v)", nameCn, nameEn, strings.Split(detail.FirstAirDate, "-")[0])
|
||||||
if !utils.IsChineseChar(nameCn) {
|
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 = fmt.Sprintf("%s (%v)", nameEn, strings.Split(detail.FirstAirDate, "-")[0])
|
||||||
}
|
}
|
||||||
|
|
||||||
targetDir = filepath.Join(st.GetPath(), targetDir)
|
|
||||||
|
|
||||||
r, err := c.ent.Series.Create().
|
r, err := c.ent.Series.Create().
|
||||||
SetTmdbID(int(detail.ID)).
|
SetTmdbID(int(detail.ID)).
|
||||||
SetStorageID(storageId).
|
SetStorageID(storageId).
|
||||||
|
|||||||
Reference in New Issue
Block a user