File size: 978 Bytes
7107f0b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package storage

import (
	"github.com/alist-org/alist/v3/internal/errs"
	"github.com/alist-org/alist/v3/internal/model"
	"github.com/alist-org/alist/v3/internal/offline_download/tool"
	"github.com/pkg/errors"
)

type Storage struct {
}

func (a *Storage) Run(task *tool.DownloadTask) error {
	return errs.NotSupport
}

func (a *Storage) Name() string {
	return "storage"
}

func (a *Storage) Items() []model.SettingItem {
	// qBittorrent settings
	return []model.SettingItem{}
}

func (a *Storage) Init() (string, error) {
	return "ok", nil
}

func (a *Storage) IsReady() bool {
	return true
}

func (a *Storage) AddURL(args *tool.AddUrlArgs) (string, error) {
	return "ok", nil
}

func (a *Storage) Remove(task *tool.DownloadTask) error {
	return errors.Errorf("Failed to Remove")
}

func (a *Storage) Status(task *tool.DownloadTask) (*tool.Status, error) {
	s := &tool.Status{}
	return s, nil
}

var _ tool.Tool = (*Storage)(nil)

func init() {
	tool.Tools.Add(&Storage{})
}