ytfzf icon indicating copy to clipboard operation
ytfzf copied to clipboard

feat(mpv): use single instance of mpv

Open citosid opened this issue 2 years ago • 1 comments

This commit configures mpv to create an ipc-server and re-use it to playback the files so no new instances are created

Issue #637

citosid avatar Feb 01 '23 21:02 citosid

pidof is not posix, however if written as an addon, it doesn't matter, just check if it's installed.

There is one problem that may occur where if there is more than 1 mpv instance open it could pick the wrong one.

for this line of code

echo "{"command":["loadfile","${@}", "replace"]}"

I would use $* instead of ${@} because ${@} might act weirdly with word splitting and stuff.

Lastly, could you use the development branch instead of the master branch

Other than that it looks good!

Euro20179 avatar Feb 01 '23 21:02 Euro20179