Add retain_folder_name_extension option

This commit is contained in:
Ben Sarmiento
2023-11-07 17:20:54 +01:00
parent d5746fcf5a
commit c2bf627413
10 changed files with 41 additions and 74 deletions

View File

@@ -40,14 +40,13 @@ func createSingleTorrentResponse(basePath string, torrents []torrent.Torrent) (s
for _, torrent := range torrents {
for _, file := range torrent.SelectedFiles {
if file.Link == "" {
// TODO: fix the file?
// log.Println("File has no link, skipping", file.Path)
continue
}
filename := filepath.Base(file.Path)
if finalName[filename] {
// fragment := davextra.GetLinkFragment(file.Link)
// filename = davextra.InsertLinkFragment(filename, fragment)
continue
}
finalName[filename] = true