HaveAGitGat / Tdarr

Tdarr - Distributed transcode automation using FFmpeg/HandBrake + Audio/Video library analytics + video health checking (Windows, macOS, Linux & Docker)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Variables and how to use them

xstrex opened this issue · comments

I've already asked this question on Discord & Reddit, and no one seems to know. How are variables used in Tdarr?

On each library I set a variable called type: to the content name of the library. After the media is processed, it (should) be sorted based on type: then perform an additional action. But the type variable gets skipped every time, and I’ve got no idea why. Plus the documentation references an older, non-relevant use of variables that doesn’t match the UI.

How should I be using variables?

Unanswered post on discord (with pictures): https://discord.com/channels/623392507828371476/1227992929268928512

Hi, not sure what you have tried so far, so I'll try to be as thorough as I can in the hope than you can pick up the solution to your problem.

  1. Set the variable on every library that is gonna use the flow.
image
  1. Use the "Check Flow Variable" from the list of Flow Plugins, using the help tooltip of each input to understand what's expected by the plugin.
    image
    image
    image

  2. Run a test and check the logs.

image

Ah! Thank you! I've been fighting with this for weeks!
I was missing the args.userVariables.library. and was just checking library == movie, not args.userVariables.library.library == movie. Thanks so much!!

I know from experience that documentation is usually the last thing to be updated, but this section could use a little better explanation imo.

Happy to help ;)

I know from experience that documentation is usually the last thing to be updated, but this section could use a little better explanation imo.

Couldn't agree more. Especially since most of the time you need the brackets {{{}}} around the variable but in this specific case you don't :S It's confusing. But Flows are still kinda new.

Eureka! It actually worked! Thank you so much; it's so frustrating when you try to do the thing what seams like the right way, then ask for help and get crickets. Anyways, this is exactly what I've expected to see, but never did!!
image

Now the full flow I've designed actually gets called, awesome!

@xstrex pleased you got it working. Not sure if you saw the examples by clicking the ? button on the input but worth starting there.

@Marnalas yes that plugin was done before the {{{}}} templating system was implemented. It was actually updated earlier today so using {{{}}} is the correct way (will show in the examples if you check the latest plugins) but still works without it so doesn’t break any existing setups.