Use existing tag data in script

Hey all, I was looking for some advice on how to do a thing.

I was trying to build a script for TMDB.org that would pull TV episode info and ran into a snag since all the info is down behind season and episode subdirectories. I know there should be a way to have the script grab the season and episode numbers from the existing tag, but I can't seem to find it in the documentation.

f someone could direct me to the right part of the documentation or has some advice that would be great.

OK I was trying to figure this out, why is this not working?

  json_select "id"
 SayRest
 Say "/season/"
 $num(%tvseason%,)
 SayRest
 Say "/episode/"
 $num(%tvepisode%,)
 SayRest
 Say "?api_key=XXXXXXXXXXXX&language=English" # USE SAME API KEY AND LANGUAGE AS MENTIONED ABOVE
 Say "|"

Yes, it is not possible to access the tag data from the script. Also, scripting functions like $num() are not available there.

You can use the input from the search parameters to compose the target URL, or let the user enter the direct URL and append the API key in the script.

Please also see this topic for an existing Tag Source for TMDB: