feat: check all in dir

This commit is contained in:
Simon Ding
2024-07-14 20:24:33 +08:00
parent 6a5ff9707e
commit 6f91157d40
5 changed files with 122 additions and 10 deletions

View File

@@ -112,13 +112,7 @@ func (s *Server) searchAndDownload(seriesId, seasonNum, episodeNum int) (*string
}
torrent.Start()
var name = series.NameEn
if name == "" {
name = series.OriginalName
}
var year = strings.Split(series.AirDate, "-")[0]
dir := fmt.Sprintf("%s (%s)/Season %02d", name, year, ep.SeasonNumber)
dir := fmt.Sprintf("%s/Season %02d", series.TargetDir, ep.SeasonNumber)
history, err :=s.db.SaveHistoryRecord(ent.History{
SeriesID: ep.SeriesID,