Fixing a typo, and changing the config parameter to be consistent.
This commit is contained in:
parent
8586271540
commit
af1ddd2b5d
@ -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.")
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user