Closed yatagan41 closed 5 years ago
Probably you just can't. (yet) That's because xt7 uses some lua scripts, "stealing" the mpv --script option. I'll look into the issue.
Hey, i just checked, and it seems that you can just pass multiple --script options to mpv. By grabbing the latest git, you can just do something like that:
This can work right now for all of the scripts that dont requires keybindings; but since xt7 manages keypresses by his own, any key you hit, will not be passed to the lua script; this would require some work and i have to think a way to do it...
Passing keys to mpv is hard for xt7, and would require to completely rewrite the key handling code, so don't hold your breath, sorry...
In 246cc627e01ff620411af9661de0eb6d7c2a18b0 i think i managed to fix the issue. Basically, every hotkey that has not yet been defined in xt7 will be forwarded to mpv. This would only partially solve the problem, since there are some keys (like keypad numbers) that cannot be handled/captured by xt7. So i made another table in the hotkeys window; you can find it under hotkeys->xt7->mpv translation tab. Here you can map/translate a custom hotkey to an mpv formatted hotkey. That way you can (eg:) map control+shift+5 to mpv's control+KP5. This, other than solving the map problem, allows you to redefine an mpv script hotkey without actually editing it.
Other than that, there is a new editable list that can be filled with user scripts to be loaded:
Waiting for you to test (there may be bugs) and understand how it works to close this one.
Thank you so much for this.I will test it right away.
Well, it gives me another error and crashes when i try to play a file:
This application has raised an unexpected error and must abort.
[11] Unknown symbol 'children' in class 'Button'. GeneralOptions.Parse.331
It should be fixed by the latest commit
The new "User Scripts" section not working but adding scripts from "User options" works. I managed to make some scripts work but i had to use "local hotkeys" section as following: script-binding "Script Name"/"Corresponding binding in script" Example: script-binding show_filename/check_file_name xt7-->mpv translation doesnt appears to be working.
Hi again
Also, in the email notification i also read: "Also, scripts that run in background without user input doesnt work.(Like; show-stream-title.lua)" But i've had troubles to replicate, since xt7 uses his own playlist managment. is that ok?
Everything works as expected now.Thanks for your efforts! show-stream-title issue looks like something script related.Doesnt work with pure mpv either. (For me at least). So, it is not a bug.Sorry about that.
But there is one little thing.I like a script to handle my playlist. It works great but every time i use that script, xt7-player asks: "This seems a playlist.Do you want me to manage it". I can skip that dialog but if i could hide it permanently that would be great.Thanks again!
I'm glad it works finally. But for the playlist/script/dialog issue, i'm afraid it is too specific as a use case.
Still, if there are functions you are missing from the actual library/playlist managment done by xt7, you can ask for them.
Meanwhile, i'll close this.
I am having a hard time making scripts work. Can you tell me how can i run lua scripts?