feat: add to blacklist ui

This commit is contained in:
Simon Ding
2025-04-22 19:04:16 +08:00
parent 834254b9b8
commit 0dea185077
5 changed files with 74 additions and 17 deletions

View File

@@ -323,7 +323,14 @@ func (c *client) GetAllDonloadClients() []*ent.DownloadClients {
cc, err := c.ent.DownloadClients.Query().Order(ent.Asc(downloadclients.FieldPriority1)).All(context.TODO())
if err != nil {
log.Errorf("no download client")
return nil
return []*ent.DownloadClients{
{
Implementation: downloadclients.ImplementationBuildin,
Name: "内建下载器",
Priority1: 9999,
Enable: true,
},
}
}
cc = append(cc, &ent.DownloadClients{
Implementation: downloadclients.ImplementationBuildin,