mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-08 02:57:38 +08:00
feat: better seeding status
This commit is contained in:
@@ -33,7 +33,7 @@ func (c *Client) Init() {
|
||||
}
|
||||
|
||||
func (c *Client) reloadTasks() {
|
||||
allTasks := c.db.GetHistories()
|
||||
allTasks := c.db.GetRunningHistories()
|
||||
for _, t := range allTasks {
|
||||
torrent, err := transmission.ReloadTorrent(t.Saved)
|
||||
if err != nil {
|
||||
@@ -78,8 +78,7 @@ func (c *Client) MustTMDB() *tmdb.Client {
|
||||
return t
|
||||
}
|
||||
|
||||
|
||||
func (c *Client) RemoveTaskAndTorrent(id int)error {
|
||||
func (c *Client) RemoveTaskAndTorrent(id int) error {
|
||||
torrent := c.tasks[id]
|
||||
if torrent != nil {
|
||||
if err := torrent.Remove(); err != nil {
|
||||
@@ -92,4 +91,4 @@ func (c *Client) RemoveTaskAndTorrent(id int)error {
|
||||
|
||||
func (c *Client) GetTasks() map[int]*Task {
|
||||
return c.tasks
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user