X-Git-Url: https://njoseph.me/gitweb/nimcoon.git/blobdiff_plain/3c20e75c565cd0d0eb73ca8060c22bf557aeab89..f7735b43cbeb05c3e30cc9d2d0df3197fa1c0eb9:/nimcoon.nim diff --git a/nimcoon.nim b/nimcoon.nim index f69813d..c838b34 100644 --- a/nimcoon.nim +++ b/nimcoon.nim @@ -10,10 +10,11 @@ import std/[terminal], strtabs, strutils, + tables, uri, xmltree -import preferences +import config type SearchResult = tuple[title: string, url: string] @@ -100,13 +101,10 @@ proc main() = 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(" "))