mirror of
https://github.com/simon-ding/polaris.git
synced 2026-05-26 20:47:57 +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 {
|
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 {
|
} else {
|
||||||
seasonNum, err := utils.SeasonId(his.TargetDir)
|
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)
|
log.Errorf("no season id: %v", his.TargetDir)
|
||||||
seasonNum = -1
|
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)
|
err = s.db.DeleteHistory(id)
|
||||||
|
|||||||
Reference in New Issue
Block a user