Fixing a typo, and changing the config parameter to be consistent.

This commit is contained in:
Matt Burchett 2018-11-15 05:46:16 +00:00
parent 8586271540
commit af1ddd2b5d
2 changed files with 2 additions and 2 deletions

View File

@ -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(&sectionID, "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.")

View File

@ -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))