diff --git a/cmd/main.go b/cmd/main.go index e446193..9582fcc 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -44,7 +44,7 @@ func main() { var check bool var delete bool - flag.StringVar(&c, "c", "", "Configuration to load") + flag.StringVar(&c, "config", "", "Configuration to load") flag.IntVar(&days, "days", 0, "How many days of inactivity to look for on Plex.") flag.IntVar(§ionID, "sectionid", 0, "Plex Section ID") flag.BoolVar(&check, "check", true, "Perform only a check. This will send the message out to Telegram with what can be removed. Does not delete.") diff --git a/pkg/communicator/communicator.go b/pkg/communicator/communicator.go index 7a9405c..5fde12b 100644 --- a/pkg/communicator/communicator.go +++ b/pkg/communicator/communicator.go @@ -15,7 +15,7 @@ import ( func TelegramPost(config config.Config, titles []string) error { url := "https://api.telegram.org/bot" + config.TelegramToken + "/sendMessage" - values := map[string]string{"chat_id": config.TelegramChatID, "text": "The following items are to be removed from " + config.ServerName + " in 24 hours. Please go to Plex and start the title to keep it on" + config.ServerName + ". You do not need to keep watching, just hit play and load a few seconds.\n\n" + fmt.Sprintf("%v", strings.Join(titles, "\n")), "disable_notifications": "true"} + values := map[string]string{"chat_id": config.TelegramChatID, "text": "The following items are to be removed from " + config.ServerName + " in 24 hours. Please go to Plex and start the title to keep it on " + config.ServerName + ". You do not need to keep watching, just hit play and load a few seconds.\n\n" + fmt.Sprintf("%v", strings.Join(titles, "\n")), "disable_notifications": "true"} jsonValue, _ := json.Marshal(values) req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonValue))