diff --git a/src/bin/noise b/src/bin/noise index 46832ee..2accedd 100755 --- a/src/bin/noise +++ b/src/bin/noise @@ -121,7 +121,10 @@ def "main insert" [ --host(-H): string # mpd host , ...uri: string # URI to insert ] { let host = getHost $host - $in | mpc insert --host $host ($uri | str join " ") + match ($uri | is-empty) { + true => { $in | mpc insert --host $host } + false => {mpc insert --host $host $uri } + } } # Adds uri to the end of current que @@ -129,7 +132,10 @@ def "main add" [ --host(-H): string # mpd host , ...uri: string # URI to add ] { let host = getHost $host - $in | mpc add --host $host ($uri | str join " ") + match ($uri | is-empty) { + true => { $in | mpc add --host $host } + false => { mpc add --host $host $uri } + } } # Direct wrapper around 'mpc crossfade'