Compare commits

..

8 Commits

Author SHA1 Message Date
eb48408b4d remove sample 2024-11-22 13:36:29 +07:00
02c511b1eb update 2024-09-24 15:31:11 +07:00
071e230aed Update DeleteArr.go 2024-01-12 10:23:57 +07:00
08db9cb820 Update DeleteArr.go 2024-01-12 10:09:22 +07:00
977018f104 revert 63269ff6bc
revert Update DeleteArr.go
2024-01-12 10:05:10 +07:00
63269ff6bc Update DeleteArr.go 2024-01-12 09:57:16 +07:00
12c539663b t 2023-12-18 15:38:57 +07:00
5e24ba6051 t 2023-12-18 15:36:12 +07:00
2 changed files with 13 additions and 4 deletions

View File

@ -64,6 +64,8 @@ func (m *MediaFiles) SendGotify(message string, arr string, cfg *Config) {
if cfg.Gotify.Enabled {
http.PostForm(cfg.Gotify.ServerURL+"/message?token="+cfg.Gotify.Token,
url.Values{"message": {message}, "title": {"Deleting Media from " + arr}, "priority": {"10"}})
log.Printf("Message sent to Gotify: %s", message)
}
}
@ -129,7 +131,7 @@ func main() {
if RadarrEventType != "" {
m.EventType = os.Getenv("radarr_eventtype")
m.SourcePath = os.Getenv("radarr_moviefile_sourcepath")
log.Printf("The Source Path is: %v", m.SourcePath)
log.Printf("---------------------------------------------------------\nThe Source Path is: %v", m.SourcePath)
m.SourceFolder = os.Getenv("radarr_moviefile_sourcefolder")
log.Printf("The Source Folder is: %v", m.SourceFolder)
m.Arr = "Radarr"
@ -139,8 +141,8 @@ func main() {
if SonarrEventType != "" {
m.EventType = os.Getenv("sonarr_eventtype")
m.SourcePath = os.Getenv("sonarr_episodefile_sourcepath")
log.Printf("The Source Path is: %v", m.SourcePath)
m.SourceFolder = os.Getenv("radarr_moviefile_sourcefolder")
log.Printf("---------------------------------------------------------\nThe Source Path is: %v", m.SourcePath)
m.SourceFolder = os.Getenv("sonarr_episodefile_sourcefolder")
log.Printf("The Source Folder is: %v", m.SourceFolder)
m.Arr = "Sonarr"
}
@ -164,6 +166,12 @@ func main() {
for _, v := range files {
log.Println("Found file: " + v.Name())
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 {

View File

@ -8,4 +8,5 @@ general:
- 4K-Movies
- Series
- 4K-Series
- Kids
- Kids
- Animes