35 lines
536 B
Go
Raw Normal View History

package main
import (
"flag"
"github.com/animenotifier/arn"
)
// Shell parameters
var animeID string
2018-03-27 01:13:45 +00:00
var queue string
// Shell flags
func init() {
flag.StringVar(&animeID, "id", "", "ID of the anime you want to refresh")
2018-03-27 01:13:45 +00:00
flag.StringVar(&queue, "queue", "", "Queue type you want to refresh (high, medium, low)")
flag.Parse()
}
// InvokeShellArgs ...
func InvokeShellArgs() bool {
if animeID != "" {
anime, err := arn.GetAnime(animeID)
if err != nil {
panic(err)
}
refresh(anime)
return true
}
return false
}