From: Joseph Nuthalapati Date: Fri, 27 Mar 2020 07:10:51 +0000 (+0530) Subject: Allow CLI player controls for music X-Git-Tag: 0.1.0~5 X-Git-Url: http://njoseph.me/gitweb/nimcoon.git/commitdiff_plain/e71f26f3b64d2bbe6c7b8d355a82c33f985aadf0 Allow CLI player controls for music Signed-off-by: Joseph Nuthalapati --- diff --git a/src/lib.nim b/src/lib.nim index 1b6ed93..f5ee8a5 100644 --- a/src/lib.nim +++ b/src/lib.nim @@ -51,7 +51,10 @@ proc presentVideoOptions*(searchResults: seq[SearchResult]) = proc play*(player: string, args: openArray[string], title: string) = styledEcho "\n", fgGreen, "Playing ", styleBright, fgMagenta, title - discard execProcess(player, args=args, options=processOptions) + if "--no-video" in args: + discard execShellCmd(&"{player} {args.join(\" \")}") + else: + discard execProcess(player, args=args, options=processOptions) proc download*(args: openArray[string], title: string) = styledEcho "\n", fgGreen, "Downloading ", styleBright, fgMagenta, title