I want to create a button that adds a subtittle track to a video file via ffmpeg. I want this button to only be clickable when exactly 2 files are selected: One supported movie file (so either .mkv or .mp4) and one subtitle track file (.srt [maybe I want to support .ass later])
I tried to do it via this modiifer:
My logic being, disable the button when:
- Not exactly 2 selected files
- No .mkv or .mp4 selected
- No .srt selected
But the button still enables even if I only selected 2 srt files alone or 2 movie files alone. So this is not what I want. Is there a way to do this?
From what I can see the program will only consider the first disableonsel statement. The rest are ignored.
This is what I came up with:
The above code will only enable the button when a video is selected or when a srt file is selected.
Given how common videos are though, it may be wise to just drop the requirement for having a video file selected altogether and just require having an srt file selected.
I'm not aware of any way to have it so that it only enables when once of each is selected aside from making a script.
Alternatively, if you have a label set for a video or you add something to the name like [tosub], it's possible to use @disableif to disable the button unless either the name contains tosub or it contain the label you specify.