New Expandable file formats ()

This commit is contained in:
Antonio Navarro Perez 2021-11-29 11:07:54 +01:00 committed by GitHub
parent 15c72452de
commit 8d9a9281c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 808 additions and 346 deletions
torrent/loader

View file

@ -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