Update kink script for nushell 0.86

This commit is contained in:
Erwin Boskma 2023-11-03 10:07:12 +01:00
parent d1bcd86fc6
commit ab2a3202b2
Signed by: erwin
SSH key fingerprint: SHA256:3F6Cm6I3erRqlBwEghZWAQl6eS5WrGTX1Vs/Evec1lQ

View file

@ -11,9 +11,9 @@ export def main [channel?: string] {
})
let playlist = ($playlist.playlist | transpose | where {|x| ($x.column0 | str starts-with "File") } | get column1)
mpc clear
let streamIndex = (random integer ..(($playlist | length) - 1))
let streamIndex = (random int ..(($playlist | length) - 1))
echo $"Playing stream ($streamIndex)"
let stream = ($playlist | get $streamIndex)
mpc add $stream
mpc play
}
}