Open Moodkiller opened 6 years ago
I don't really use Windows anymore so it could take some time until I get to investigate into this. Since apparently it started with the new Windows build, it might be something with Powershell here.
However, adding more variables for the legacy mode should be easy enough. You can even do it yourself since the code is really simple: https://github.com/FichteFoll/hexchat-addons/blob/230a42a21ac71badd1d53fa6b775c4a9e926158b/mpv_np.py#L239-240
Hmm potentially could be. There have been a few changes around it thinking back now. Also regarding the more variables to legacy mode, I'll have a play around again - tried it before but I don't think I could get it to work when following the same format. Iirc, it was the syntax here I was struggling with... i.e, how would one add more variables to that line once defined?
Yes, the legacy version uses simple Python string formatting, so you'll only be able to insert variables like {title}
when you define them in the line of code I referenced, and most specifically no conditionals.
The syntax would be to pass a keyword argument with the field's name as they key and whatever value as its value (like with mpv.command("get_property", "media-title")
previously).
Alright, will give it another shot. Thanks for the explanation. Also for what its worth, increasing the timeout from 1.5 to 5 seems to result in less fallbacks but of course a longer delay/lockup if it doesn't spit the non legacy format
I suppose the best option would be to ask for an IPC command that does property expansion to be added in mpv natively rather than trying to hack around it using the run
command… It's really not a great hack.
Or to at least try to emulate it in a feasible way.
Ideally yeah. Is it feasible to write the variables used for the rich formatted version (i.e the CMD_FMT
) to a temp text file and then apply the formatting in there and making Hexchat read that text file instead?? Im assuming the script is failing on grabbing said variables, but if the legacy mode works 100%, the output could be reconfigured (of course I type this before I've had a chance to play around with the legacy variables)
From the bit of testing I've done along with other users, this seems to happen almost every time on Windows 1803. The Windows version before seemed fine and it only fell back to legacy mode if there was something in the title that the script/mpv didnt like.
Wondering if you could look into this at all? Alternatively, is there more styling options available for legacy mode? Currently I have {filename}, {file-size}, {time-pos}${!duration==0: / ${duration}}] and {mpv-version} in the CMD_FMT version, would be great to somehow get these into the LEGACY_CMD_FMT function.