fix: target dir

This commit is contained in:
Simon Ding
2024-07-30 11:49:42 +08:00
parent b7aeb9c3c6
commit e2bba8ec71
3 changed files with 4 additions and 3 deletions

View File

@@ -284,7 +284,7 @@ func (s *Server) DownloadTorrent(c *gin.Context) (interface{}, error) {
MediaID: m.ID,
EpisodeID: ep.ID,
SourceTitle: name,
TargetDir: "./",
TargetDir: m.TargetDir,
Status: history.StatusRunning,
Size: in.Size,
Saved: torrent.Save(),
@@ -297,7 +297,7 @@ func (s *Server) DownloadTorrent(c *gin.Context) (interface{}, error) {
s.db.SetEpisodeStatus(ep.ID, episode.StatusDownloading)
}()
s.sendMsg(fmt.Sprintf(message.BeginDownload, in.Name))
log.Infof("success add %s to download task", in.Name)
return in.Name, nil