feat: activity page

This commit is contained in:
Simon Ding
2024-07-13 17:23:27 +08:00
parent 01408cdd89
commit 85f8750908
11 changed files with 178 additions and 22 deletions

View File

@@ -3,7 +3,6 @@ package server
import (
"polaris/db"
"polaris/log"
"polaris/pkg"
"polaris/pkg/tmdb"
"polaris/pkg/transmission"
"polaris/ui"
@@ -21,7 +20,7 @@ func NewServer(db *db.Client) *Server {
r: r,
db: db,
cron: cron.New(),
tasks: make(map[int]pkg.Torrent),
tasks: make(map[int]*Task),
}
}
@@ -30,7 +29,7 @@ type Server struct {
db *db.Client
cron *cron.Cron
language string
tasks map[int]pkg.Torrent
tasks map[int]*Task
}
func (s *Server) Serve() error {
@@ -118,6 +117,6 @@ func (s *Server) reloadTasks() {
log.Errorf("relaod task %s failed: %v", t.SourceTitle, err)
continue
}
s.tasks[t.ID] = torrent
s.tasks[t.ID] = &Task{Torrent: torrent}
}
}