Add add_samples to available flags
This commit is contained in:
@@ -2,7 +2,6 @@ package types
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/sirrobot01/decypharr/internal/config"
|
||||
"github.com/sirrobot01/decypharr/internal/logger"
|
||||
"github.com/sirrobot01/decypharr/internal/utils"
|
||||
"github.com/sirrobot01/decypharr/pkg/arr"
|
||||
@@ -88,26 +87,6 @@ type File struct {
|
||||
Generated time.Time `json:"generated"`
|
||||
}
|
||||
|
||||
func (f *File) IsValid() bool {
|
||||
cfg := config.Get()
|
||||
name := filepath.Base(f.Path)
|
||||
if utils.IsSampleFile(f.Path) {
|
||||
return false
|
||||
}
|
||||
|
||||
if !cfg.IsAllowedFile(name) {
|
||||
return false
|
||||
}
|
||||
if !cfg.IsSizeAllowed(f.Size) {
|
||||
return false
|
||||
}
|
||||
|
||||
if f.Link == "" {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func (t *Torrent) Cleanup(remove bool) {
|
||||
if remove {
|
||||
err := os.Remove(t.Filename)
|
||||
|
||||
Reference in New Issue
Block a user