Closed escapezn closed 2 years ago
I have placed two variables, one for MPV portable config directory and one to place it in the directory of scripts. You can also specify any other directory you want, but..
if there is another directory you want me to add it as a variable, let me know and I'll hopefully do it.
Give me an example of the final path so I can see whether it's possible or not
Sorry I didn't describe it clear enough. I mean user profile directory on windows, according to mpv's manual is %APPDATA%/mpv. It's not a problem if not use portable config, as mpv use %APPDATA%/mpv by default and thus the log will be saved there. But if mpv is in portable mode while I still want the log to be saved in APPDATA, that's the case of my issue.
Alright, I'll add the variable in next minor update
This is done now, you should be able to define any variable in the configuration file.
by using /:var
then variable name, example:
log_path=/:var%APPDATA%\\mpv
or in .conf
log_path=/:var%APPDATA%\mpv
However, because this a big update your old .log file will not be compatible, remove the old mpvHistory.log file to use the new version. Or to migrate the log to support the new version, (make sure you backup your old .log file, just in case) open the log and usually press ctrl+h to replace the following:
replace all
| time=
to
| length=0 | time=
Thanks for your update. But seems it is unable to write to a nonexistent directory (create a directory automatically), maybe mpv's fault?
It is the default behavior, I can look into creating directories but I don't think it is something worth handling. Is there a usual use-case you need it for?
It doesn't matter. Just because portable mpv didn't have %APPDATA%/mpv created before, not a big problem.
The config file of SimpleHistory.lua currently didn't offer a variable of user profile directory to save log, making it inconvenient to use absolute path instead.
It would be very helpful if such variable exists, please consider adding it in the future. Thanks!