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

@@ -9,7 +9,6 @@ import (
"github.com/debridmediamanager.com/zurg/internal/config"
"github.com/debridmediamanager.com/zurg/internal/torrent"
"github.com/debridmediamanager.com/zurg/pkg/davextra"
"github.com/debridmediamanager.com/zurg/pkg/logutil"
"github.com/hashicorp/golang-lru/v2/expirable"
)
@@ -53,8 +52,7 @@ func HandleHeadRequest(w http.ResponseWriter, r *http.Request, t *torrent.Torren
return
}
filenameV2, linkFragment := davextra.ExtractLinkFragment(filename)
_, file := getFile(torrents, filenameV2, linkFragment)
_, file := getFile(torrents, filename)
if file == nil {
log.Errorf("Cannot find file from path %s", requestPath)
http.Error(w, "Cannot find file", http.StatusNotFound)