Fix sample check rd

This commit is contained in:
Mukhtar Akere
2025-03-31 08:23:11 +01:00
parent f9addaed36
commit 5792305a66
4 changed files with 5 additions and 6 deletions

View File

@@ -51,14 +51,13 @@ func getTorrentFiles(t *types.Torrent, data TorrentInfo, validate bool) map[stri
cfg := config.GetConfig()
idx := 0
for _, f := range data.Files {
name := filepath.Base(f.Path)
if validate {
if utils.RegexMatch(utils.SAMPLEMATCH, name) {
if utils.IsSampleFile(f.Path) {
// Skip sample files
continue
}
if !cfg.IsAllowedFile(name) {
continue
}