fix: blacklist name

This commit is contained in:
Simon Ding
2025-04-23 10:45:03 +08:00
parent cff83e4d5f
commit 502d482ea9

View File

@@ -122,14 +122,7 @@ func (s *Server) RemoveActivity(c *gin.Context) (interface{}, error) {
}
func (s *Server) addTorrent2Blacklist(h *ent.History) error {
var name string
task, ok := s.core.GetTask(h.ID)
if ok {
name, _ = task.Name()
}
return s.db.AddTorrent2Blacklist(h.Hash, name, h.MediaID)
return s.db.AddTorrent2Blacklist(h.Hash, h.SourceTitle, h.MediaID)
}
func (s *Server) GetAllBlacklistItems(c *gin.Context) (interface{}, error) {