Use less dangerous ways of joining strings

Signed-off-by: Joseph Nuthalapati's avatarJoseph Nuthalapati <[email protected]>
parent ebee3b71
Pipeline #103002780 passed with stage
in 55 seconds
......@@ -53,7 +53,6 @@ for kind, key, value in getopt():
of cmdEnd:
let noVideo = if musicOnly: "--no-video" else: ""
if "" in searchQuery:
discard execProcess(&"{player} {searchQuery}")
......@@ -69,5 +68,10 @@ let number = parseInt(readLine(stdin))
styledEcho "\n", fgGreen, "Playing ", styleBright, fgMagenta, searchResults[number].title
var command = @[player, searchResults[number].url]
if musicOnly:
# Play the video using the preferred/available media player
discard execProcess(&"{player} {noVideo} {searchResults[number].url}")
discard execProcess(command.join(" "))
......@@ -2,7 +2,7 @@
# Supported video players in order of preference.
# Should be able to play YouTube videos directly.
let supportedPlayers* = ["cvlc", "mpv"]
let supportedPlayers* = ["mpv", "cvlc"]
# Only show these many results
let limit* = 10
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment