New Expandable file formats (#95)
This commit is contained in:
parent
15c72452de
commit
8d9a9281c9
26 changed files with 808 additions and 346 deletions
torrent/loader
|
@ -17,6 +17,7 @@ func NewConfig(r []*config.Route) *Config {
|
|||
func (l *Config) ListMagnets() (map[string][]string, error) {
|
||||
out := make(map[string][]string)
|
||||
for _, r := range l.c {
|
||||
out[r.Name] = make([]string, 0)
|
||||
for _, t := range r.Torrents {
|
||||
if t.MagnetURI == "" {
|
||||
continue
|
||||
|
@ -32,6 +33,7 @@ func (l *Config) ListMagnets() (map[string][]string, error) {
|
|||
func (l *Config) ListTorrentPaths() (map[string][]string, error) {
|
||||
out := make(map[string][]string)
|
||||
for _, r := range l.c {
|
||||
out[r.Name] = make([]string, 0)
|
||||
for _, t := range r.Torrents {
|
||||
if t.TorrentPath == "" {
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue