From eb48408b4d971e77a36e93429ee7dec08beb9e1a Mon Sep 17 00:00:00 2001 From: Gregory Salaun Date: Fri, 22 Nov 2024 13:36:29 +0700 Subject: [PATCH] remove sample --- DeleteArr.go | 3 +++ config-sample.yml | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/DeleteArr.go b/DeleteArr.go index 24a21fe..c0a7e73 100644 --- a/DeleteArr.go +++ b/DeleteArr.go @@ -169,6 +169,9 @@ func main() { if filepath.Base(v.Name()) == "sample.mkv" { os.Remove(m.SourceFolder + "/" + v.Name()) } + if _, err = os.Stat(m.SourceFolder + "/Sample"); !os.IsNotExist(err) { + os.Remove(m.SourceFolder + "/Sample") + } if filepath.Ext(v.Name()) == ".mkv" { mkvCount += 1 } else { diff --git a/config-sample.yml b/config-sample.yml index 340b8c4..6723df0 100644 --- a/config-sample.yml +++ b/config-sample.yml @@ -8,4 +8,5 @@ general: - 4K-Movies - Series - 4K-Series - - Kids \ No newline at end of file + - Kids + - Animes \ No newline at end of file