std/[terminal],
strtabs,
strutils,
+ tables,
uri,
xmltree
-import preferences
+import config
type
SearchResult = tuple[title: string, url: string]
var command = @[player, searchResults[number].url]
if musicOnly:
- command.add("--no-video")
+ command.add(playerOptions[player]["musicOnly"])
if fullScreen:
- if player == "cvlc":
- command.add("--fullscreen")
- if player == "mpv":
- command.add("--fs")
+ command.add(playerOptions[player]["fullScreen"])
# Play the video using the preferred/available media player
play(command.join(" "))