Remove aria2 and update docker compsoe for qbittorent

This commit is contained in:
2023-09-20 16:20:24 +02:00
parent e840279102
commit 32cb194cfc
9 changed files with 17 additions and 154 deletions
+4 -4
View File
@@ -7,18 +7,18 @@ import (
type Controller struct {
Database *services.Database
Aria2 *services.Aria2
Qbittorent *services.Qbittorent
}
func NewController(db *services.Database, aria2 *services.Aria2) *Controller {
func NewController(db *services.Database, aria2 *services.Qbittorent) *Controller {
c := new(Controller)
c.Database = db
c.Aria2 = aria2
c.Qbittorent = aria2
return c
}
func (c *Controller) NewItem(newItem models.NewItem) (*models.Item, error) {
item, err := c.Aria2.AddItem(newItem.Uri)
item, err := c.Qbittorent.AddItem(newItem.Uri)
if err != nil {
return nil, err
}