diff --git a/home-manager/modules/nushell/scripts/kink.nu b/home-manager/modules/nushell/scripts/kink.nu index 8ff4e08..74fd65f 100644 --- a/home-manager/modules/nushell/scripts/kink.nu +++ b/home-manager/modules/nushell/scripts/kink.nu @@ -11,7 +11,7 @@ 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)) + let streamIndex = (random integer ..(($playlist | length) - 1)) echo $"Playing stream ($streamIndex)" let stream = ($playlist | get $streamIndex) mpc add $stream