Add more info in logs

This commit is contained in:
Ben Sarmiento
2023-12-07 15:16:53 +01:00
parent b8ec36ff88
commit 10aac20030

View File

@@ -84,7 +84,7 @@ func (gf *GetFile) HandleGetRequest(directory, torrentName, fileName string, res
actualExt := filepath.Ext(unrestrict.Filename) actualExt := filepath.Ext(unrestrict.Filename)
expectedExt := filepath.Ext(fileName) expectedExt := filepath.Ext(fileName)
if actualExt != expectedExt && unrestrict.Streamable != 1 { if actualExt != expectedExt && unrestrict.Streamable != 1 {
log.Warnf("File was changed and is not streamable: %s and %s", fileName, unrestrict.Filename) log.Warnf("File was changed and is not streamable: %s and %s (link=%s)", fileName, unrestrict.Filename, unrestrict.Link)
http.Error(resp, "File is not available", http.StatusNotFound) http.Error(resp, "File is not available", http.StatusNotFound)
return return
} else { } else {