Finish config mapping
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package dav
|
||||
|
||||
import (
|
||||
"log"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/debridmediamanager.com/zurg/internal/torrent"
|
||||
@@ -47,6 +48,12 @@ func createSingleTorrentResponse(basePath string, torrents []torrent.Torrent, t
|
||||
var torrentResponses []dav.Response
|
||||
for _, torrent := range torrents {
|
||||
for _, file := range torrent.SelectedFiles {
|
||||
if file.Link == "" {
|
||||
// TODO: trigger a re-add for the file
|
||||
log.Println("File has no link, skipping", file.Path)
|
||||
t.RefreshInfo(torrent.ID)
|
||||
continue
|
||||
}
|
||||
filename := filepath.Base(file.Path)
|
||||
fragment := davextra.GetLinkFragment(file.Link)
|
||||
filename = davextra.InsertLinkFragment(filename, fragment)
|
||||
|
||||
Reference in New Issue
Block a user