; Usage: /tv <show_name>
alias tv {
var %show_name = $replace($1-,$chr(32),+)
var %api_url = https://api.tvmaze.com/singlesearch/shows?q= $+ %show_name
var %response = $urlget(%api_url)
if (%response) {
var %show_name = $json(%response,name)
var %premiered = $json(%response,premiered)
var %status = $json(%response,status)
var %summary = $replace($remove($json(%response,summary),<[^>]*>),$chr(10),$chr(32))
var %message = Show: %show_name | Premiered: %premiered | Status: %status | Summary: %summary
echo -a %message
} else {
echo -a Show not found.
}
}