Turns out both vlc and mpv have similar options!

Signed-off-by: Joseph Nuthalapati's avatarJoseph Nuthalapati <[email protected]>
parent aaeaf00b
Pipeline #108488446 passed with stage
in 1 minute and 1 second
import tables
# Your configuration here.
# Supported video players in order of preference.
......@@ -8,14 +6,3 @@ let supportedPlayers* = ["mpv", "cvlc"]
# Only show these many results
let limit* = 10
# Some NimCoon options mapped to player options
let playerOptions* = { "mpv": {
"musicOnly": "--no-video",
"fullScreen": "--fullscreen"
}.toTable,
"cvlc": {
"musicOnly": "--no-video",
"fullScreen": "--fs"
}.toTable
}.toTable
......@@ -9,7 +9,6 @@ import
std/[terminal],
strtabs,
strutils,
tables,
uri,
xmltree
......@@ -96,10 +95,10 @@ proc main() =
var args = @[searchResults[number].url]
if musicOnly:
args.add(playerOptions[player]["musicOnly"])
args.add("--no-video")
if fullScreen:
args.add(playerOptions[player]["fullScreen"])
args.add("--fullscreen")
# Play the video using the preferred/available media player
play(player, args)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment