Thus the problem seems to be in the callback
Ok after 6 months I think I’ve solved it. For some reason the x-success parameter has to be percent encoded. Idk why. I don’t even think this behavior is even officially documented anywhere. I only found out because of this random article about automating things through the drafts app (https://www.macstories.net/tutorials/guide-url-scheme-ios-drafts/).
But anyway this code should work now. Btw I just looked up percent encoder online to actually encode it bc I was too lazy to figure out a way to do it myself or figure out what percent encoding even is.
import webbrowser url = 'url=https://youtu.be/fgZgVNxhU04' webbrowser.open('vlc-x-callback://x-callback-url/stream?' + url +'&x-success= pythonista3%3A%2F%2FMesApps%2FMesPastels.py%3Faction%3Drun')
I called an x callback string
‘webbrowser.open('vlc-x-callback://x-callback-url/stream?' + url +'&x-success=pythonista:/ytdl/youtub-playlist2.py?action=run&x-source=Pythonista3')’
And it opens the video from the url in VLC but when it finishes playing it only sends me back to the file “youtub-playlist2.py” but it never runs it. How can I make it run this file when the video finishes?