Alpha WebDAV support ()

This commit is contained in:
Antonio Navarro Perez 2021-03-01 19:04:59 +01:00 committed by GitHub
parent 0f513ef8b3
commit ed8bd64017
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 447 additions and 93 deletions
config

View file

@ -4,18 +4,25 @@ package config
type Root struct {
MaxCacheSize int64 `yaml:"max-cache-size,omitempty"`
MetadataFolder string `yaml:"metadata-folder-name,omitempty"`
AllowOther bool `yaml:"fuse-allow-other,omitempty"`
MountPoints []*MountPoint `yaml:"mountPoints"`
WebDAV *WebDAV `yaml:"webDav"`
}
type WebDAV struct {
Torrents []*Torrent `yaml:"torrents"`
}
type MountPoint struct {
AllowOther bool `yaml:"fuse-allow-other,omitempty"`
Path string `yaml:"path"`
Torrents []struct {
MagnetURI string `yaml:"magnetUri,omitempty"`
TorrentPath string `yaml:"torrentPath,omitempty"`
FolderName string `yaml:"folderName,omitempty"`
} `yaml:"torrents"`
Path string `yaml:"path"`
Torrents []*Torrent `yaml:"torrents"`
}
type Torrent struct {
MagnetURI string `yaml:"magnetUri,omitempty"`
TorrentPath string `yaml:"torrentPath,omitempty"`
FolderName string `yaml:"folderName,omitempty"`
}
func AddDefaults(r *Root) *Root {