From 946420bcc3758c3967e10cc3112b581e03ea8ec3 Mon Sep 17 00:00:00 2001 From: Matt Burchett Date: Tue, 20 Nov 2018 18:48:57 -0600 Subject: [PATCH] Tweaking --- cmd/main.go | 10 +++++----- pkg/eraser/eraser.go | 9 ++++----- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index d2b1fbc..864c802 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -56,13 +56,13 @@ func main() { log.Println(err) } } else if libraryType == "show" { - files := eraser.LookupTVFileLocation(cfg, ids) + // files := eraser.LookupTVFileLocation(cfg, ids) sonarrIDs := locator.GetSonarrIDs(cfg, titles) eraser.DeleteSeriesFromSonarr(cfg, sonarrIDs) - err = eraser.DeleteFiles(delete, files) - if err != nil { - log.Println(err) - } + // err = eraser.DeleteFiles(delete, files) + // if err != nil { + // log.Println(err) + // } } } } diff --git a/pkg/eraser/eraser.go b/pkg/eraser/eraser.go index f080cd2..d25d7c7 100644 --- a/pkg/eraser/eraser.go +++ b/pkg/eraser/eraser.go @@ -9,7 +9,6 @@ import ( "net/http" "os" "path/filepath" - "strings" "git.linuxrocker.com/mattburchett/Housekeeper/pkg/config" "git.linuxrocker.com/mattburchett/Housekeeper/pkg/model" @@ -80,7 +79,7 @@ func LookupTVFileLocation(config config.Config, ids []int) []string { plexTV := plexModel.Video for _, i := range plexTV { - fileList = append(fileList, filepath.Dir(filepath.Dir(i.Media.Part.File))) + fileList = append(fileList, filepath.Dir(i.Media.Part.File)) } for _, r := range fileList { @@ -121,9 +120,9 @@ func DeleteSeriesFromSonarr(config config.Config, ids []int) { log.Fatal(jsonErr) } - if strings.Contains("does not exist", deleteModel.Message) { - log.Printf("The following ID does not exist: %v", i) - } + // if strings.Contains("does not exist", deleteModel.Message) { + // log.Printf("The following ID does not exist: %v", i) + // } } }