2021-12-06 15:55:05 +08:00
|
|
|
package drivers
|
|
|
|
|
|
|
|
import (
|
|
|
|
_ "github.com/Xhofe/alist/drivers/123"
|
2022-01-09 22:44:43 +08:00
|
|
|
_ "github.com/Xhofe/alist/drivers/139"
|
2021-12-06 15:55:05 +08:00
|
|
|
_ "github.com/Xhofe/alist/drivers/189"
|
2022-03-09 20:30:56 +08:00
|
|
|
_ "github.com/Xhofe/alist/drivers/189pc"
|
2021-12-06 15:55:05 +08:00
|
|
|
_ "github.com/Xhofe/alist/drivers/alidrive"
|
2021-12-07 20:16:34 +08:00
|
|
|
_ "github.com/Xhofe/alist/drivers/alist"
|
2022-02-02 17:32:11 +08:00
|
|
|
_ "github.com/Xhofe/alist/drivers/baidu"
|
2021-12-31 14:05:35 +08:00
|
|
|
"github.com/Xhofe/alist/drivers/base"
|
2021-12-16 18:03:58 +08:00
|
|
|
_ "github.com/Xhofe/alist/drivers/ftp"
|
2021-12-06 15:55:05 +08:00
|
|
|
_ "github.com/Xhofe/alist/drivers/google"
|
|
|
|
_ "github.com/Xhofe/alist/drivers/lanzou"
|
2022-01-06 01:14:32 +08:00
|
|
|
_ "github.com/Xhofe/alist/drivers/mediatrack"
|
2021-12-06 15:55:05 +08:00
|
|
|
_ "github.com/Xhofe/alist/drivers/native"
|
|
|
|
_ "github.com/Xhofe/alist/drivers/onedrive"
|
2021-12-16 22:50:23 +08:00
|
|
|
_ "github.com/Xhofe/alist/drivers/pikpak"
|
2022-02-16 20:20:39 +08:00
|
|
|
_ "github.com/Xhofe/alist/drivers/quark"
|
2021-12-30 20:31:36 +08:00
|
|
|
_ "github.com/Xhofe/alist/drivers/s3"
|
2022-04-02 19:28:43 +08:00
|
|
|
_ "github.com/Xhofe/alist/drivers/sftp"
|
2021-12-29 22:07:26 +08:00
|
|
|
_ "github.com/Xhofe/alist/drivers/shandian"
|
2022-01-05 22:03:28 +08:00
|
|
|
_ "github.com/Xhofe/alist/drivers/teambition"
|
2022-03-03 19:33:40 +08:00
|
|
|
_ "github.com/Xhofe/alist/drivers/uss"
|
2021-12-30 21:39:17 +08:00
|
|
|
_ "github.com/Xhofe/alist/drivers/webdav"
|
2022-03-03 15:44:41 +08:00
|
|
|
_ "github.com/Xhofe/alist/drivers/xunlei"
|
2022-02-01 17:15:11 +08:00
|
|
|
_ "github.com/Xhofe/alist/drivers/yandex"
|
2021-12-31 14:05:35 +08:00
|
|
|
log "github.com/sirupsen/logrus"
|
|
|
|
"strings"
|
2021-12-06 15:55:05 +08:00
|
|
|
)
|
2021-12-31 14:05:35 +08:00
|
|
|
|
|
|
|
var NoCors string
|
|
|
|
var NoUpload string
|
|
|
|
|
|
|
|
func GetConfig() {
|
|
|
|
for k, v := range base.GetDriversMap() {
|
|
|
|
if v.Config().NoCors {
|
|
|
|
NoCors += k + ","
|
|
|
|
}
|
|
|
|
if v.Upload(nil, nil) != base.ErrEmptyFile {
|
|
|
|
NoUpload += k + ","
|
|
|
|
}
|
|
|
|
}
|
|
|
|
NoCors = strings.Trim(NoCors, ",")
|
2022-01-01 23:04:33 +08:00
|
|
|
NoUpload += "root"
|
2021-12-31 14:05:35 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
log.Debug("all init")
|
|
|
|
GetConfig()
|
|
|
|
}
|