mirror of
https://github.com/simon-ding/polaris.git
synced 2026-05-26 12:38:41 +08:00
fix: blacklist name
This commit is contained in:
@@ -122,14 +122,7 @@ func (s *Server) RemoveActivity(c *gin.Context) (interface{}, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *Server) addTorrent2Blacklist(h *ent.History) error {
|
func (s *Server) addTorrent2Blacklist(h *ent.History) error {
|
||||||
var name string
|
return s.db.AddTorrent2Blacklist(h.Hash, h.SourceTitle, h.MediaID)
|
||||||
|
|
||||||
task, ok := s.core.GetTask(h.ID)
|
|
||||||
if ok {
|
|
||||||
name, _ = task.Name()
|
|
||||||
}
|
|
||||||
|
|
||||||
return s.db.AddTorrent2Blacklist(h.Hash, name, h.MediaID)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Server) GetAllBlacklistItems(c *gin.Context) (interface{}, error) {
|
func (s *Server) GetAllBlacklistItems(c *gin.Context) (interface{}, error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user