open-in-mpv: respect the player's executable
config
config.yml allows to specify `executable` distinct from player name: ``` players: mpv: name: mpv executable: my-mpv-wrapper ... ``` before, the `executable` setting would be ignored: ``` $ open-in-mpv 'mpv:///open?url=https%3A%2F%2Fyoutu.be%2FdQw4w9WgXcQ' 2024/02/15 08:27:41 /usr/bin/mpv https://youtu.be/dQw4w9WgXcQ ``` after this patch, it's respected: ``` open-in-mpv 'mpv:///open?url=https%3A%2F%2Fyoutu.be%2FdQw4w9WgXcQ' 2024/02/15 08:27:53 /usr/local/bin/my-mpv-wrapper https://youtu.be/dQw4w9WgXcQ ```
This commit is contained in:
@@ -31,8 +31,8 @@ func Test_GenerateCommand(t *testing.T) {
|
||||
o.Flags = "--vo=gpu"
|
||||
o.Pip = true
|
||||
|
||||
args := o.GenerateCommand()
|
||||
t.Logf("%s %v", o.Player, args)
|
||||
executable, args := o.GenerateCommand()
|
||||
t.Logf("%s %v", executable, args)
|
||||
}
|
||||
|
||||
func Test_GenerateIPC(t *testing.T) {
|
||||
@@ -98,8 +98,8 @@ func Test_Parse(t *testing.T) {
|
||||
t.Fatal("Err should not be nil")
|
||||
}
|
||||
|
||||
args := o.GenerateCommand()
|
||||
t.Logf("%s %v", o.Player, args)
|
||||
executable, args := o.GenerateCommand()
|
||||
t.Logf("%s %v", executable, args)
|
||||
}
|
||||
|
||||
func Test_sliceContains(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user