t
This commit is contained in:
parent
e571c71bc2
commit
d2bc5ed773
12
DeleteArr.go
12
DeleteArr.go
@ -12,24 +12,26 @@ type RadarrMovie struct {
|
||||
EventType string
|
||||
SourcePath string
|
||||
SourceFolder string
|
||||
FileName string
|
||||
InFolder bool
|
||||
}
|
||||
|
||||
type SonarrSerie struct {
|
||||
SourcePath string
|
||||
SourceFolder string
|
||||
FileName string
|
||||
InFolder bool
|
||||
SeasonFolder bool
|
||||
}
|
||||
|
||||
func (r *RadarrMovie) IsInFolder() {
|
||||
folderList := []string{"Movies", "4K-Movies"}
|
||||
dir, _ := path.Split(r.SourcePath)
|
||||
log.Println("dir SourceFolder: " + dir)
|
||||
dir, f := path.Split(r.SourcePath)
|
||||
r.FileName = f
|
||||
|
||||
ContainsFolder := slices.Contains(folderList, dir)
|
||||
|
||||
if ContainsFolder {
|
||||
if !ContainsFolder {
|
||||
r.InFolder = true
|
||||
log.Printf("Movie %v is in a Folder\n", r.SourceFolder)
|
||||
} else {
|
||||
@ -40,6 +42,10 @@ func (r *RadarrMovie) IsInFolder() {
|
||||
|
||||
func main() {
|
||||
|
||||
os.Setenv("radarr_moviefile_sourcepath", "/mnt/Multimedia/Download/PostProcess/Movies/Butchers.Crossing.2023.MULTi.1080p.WEB.x264-FW/Butchers.Crossing.2023.MULTi.1080p.WEB.x264-FW.mkv")
|
||||
os.Setenv("radarr_moviefile_sourcefolder", "/mnt/Multimedia/Download/PostProcess/Movies/Butchers.Crossing.2023.MULTi.1080p.WEB.x264-FW")
|
||||
os.Setenv("radarr_eventtype", "Download")
|
||||
|
||||
ex, err := os.Executable()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
7
log.txt
7
log.txt
@ -1,3 +1,10 @@
|
||||
2023/12/17 15:03:59
|
||||
2023/12/17 15:03:59
|
||||
2023/12/17 15:03:59
|
||||
2023/12/17 17:09:02 /mnt/Multimedia/Download/PostProcess/Movies/Butchers.Crossing.2023.MULTi.1080p.WEB.x264-FW/Butchers.Crossing.2023.MULTi.1080p.WEB.x264-FW.mkv
|
||||
2023/12/17 17:09:04 radarr_moviefile_sourcefolder
|
||||
2023/12/17 17:09:53 dir SourceFolder: /mnt/Multimedia/Download/PostProcess/Movies/Butchers.Crossing.2023.MULTi.1080p.WEB.x264-FW/
|
||||
2023/12/17 17:10:32 /mnt/Multimedia/Download/PostProcess/Movies/Butchers.Crossing.2023.MULTi.1080p.WEB.x264-FW/Butchers.Crossing.2023.MULTi.1080p.WEB.x264-FW.mkv
|
||||
2023/12/17 17:10:33 /mnt/Multimedia/Download/PostProcess/Movies/Butchers.Crossing.2023.MULTi.1080p.WEB.x264-FW
|
||||
2023/12/17 17:10:33 dir SourceFolder: /mnt/Multimedia/Download/PostProcess/Movies/Butchers.Crossing.2023.MULTi.1080p.WEB.x264-FW/
|
||||
2023/12/17 17:10:33 Movie /mnt/Multimedia/Download/PostProcess/Movies/Butchers.Crossing.2023.MULTi.1080p.WEB.x264-FW is in a Folder
|
||||
|
Loading…
x
Reference in New Issue
Block a user