You need to set up an input_boolean that is turned on when the movie starts and then use the state of that as a condition in your automation and also use that automation to reset it’s state to off.
I managed to make it work.
Now my problem is this …
You do perform nothing for music … But if for example on the cover of the movie, it is reproducing the movie theme … it is not called for automation.
Because he is not starting from idle to play … he is starting to play to play, that is, there is no change of status;
I need help now in this part. How to make the HA understand that changed from playing music to playing movie …