mirror of
https://github.com/simon-ding/polaris.git
synced 2026-03-07 18:10:49 +08:00
fix: remove seeding torrent status not right
This commit is contained in:
@@ -70,7 +70,9 @@ func (s *Server) RemoveActivity(c *gin.Context) (interface{}, error) {
|
||||
}
|
||||
|
||||
if his.EpisodeID != 0 {
|
||||
s.db.SetEpisodeStatus(his.EpisodeID, episode.StatusMissing)
|
||||
if his.Status == history.StatusRunning || his.Status == history.StatusUploading {
|
||||
s.db.SetEpisodeStatus(his.EpisodeID, episode.StatusMissing)
|
||||
}
|
||||
|
||||
} else {
|
||||
seasonNum, err := utils.SeasonId(his.TargetDir)
|
||||
@@ -78,8 +80,9 @@ func (s *Server) RemoveActivity(c *gin.Context) (interface{}, error) {
|
||||
log.Errorf("no season id: %v", his.TargetDir)
|
||||
seasonNum = -1
|
||||
}
|
||||
s.db.SetSeasonAllEpisodeStatus(his.MediaID, seasonNum, episode.StatusMissing)
|
||||
|
||||
if his.Status == history.StatusRunning || his.Status == history.StatusUploading {
|
||||
s.db.SetSeasonAllEpisodeStatus(his.MediaID, seasonNum, episode.StatusMissing)
|
||||
}
|
||||
}
|
||||
|
||||
err = s.db.DeleteHistory(id)
|
||||
|
||||
Reference in New Issue
Block a user