update
This commit is contained in:
parent
44c84f0dc3
commit
6c7e6ac06e
@ -5,6 +5,7 @@ import (
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"slices"
|
||||
)
|
||||
|
||||
type RadarrMovie struct {
|
||||
@ -25,9 +26,9 @@ func (r *RadarrMovie) IsInFolder() {
|
||||
folderList := []string{"Movies", "4K-Movies"}
|
||||
dir, _ := path.Split(r.SourceFolder)
|
||||
|
||||
for _, p := range folderList {
|
||||
log.Println(p)
|
||||
if p == dir {
|
||||
ContainsFolder := slices.Contains(folderList, dir)
|
||||
|
||||
if ContainsFolder {
|
||||
r.InFolder = true
|
||||
log.Printf("Movie %v is in a Folder\n", r.SourceFolder)
|
||||
} else {
|
||||
@ -35,7 +36,6 @@ func (r *RadarrMovie) IsInFolder() {
|
||||
log.Printf("Movie %v is not in a Folder\n", r.SourceFolder)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user