X-Git-Url: http://njoseph.me/gitweb/nimcoon.git/blobdiff_plain/bd7117ada0e5f895e38c0476683e9adcae6dbd04..0c2f03858ecba0812c1b92bd5d2ace75e676ddaa:/src/lib.nim diff --git a/src/lib.nim b/src/lib.nim index d36e2c2..3033458 100644 --- a/src/lib.nim +++ b/src/lib.nim @@ -156,7 +156,10 @@ proc directDownload*(url: string, musicOnly: bool) = let args = if musicOnly: buildMusicDownloadArgs(url) else: buildVideoDownloadArgs(url) - discard execShellCmd(&"youtube-dl {args.join(\" \")}") + if isInstalled("aria2c"): + discard execShellCmd(&"youtube-dl {args.join(\" \")} --external-downloader aria2c --external-downloader-args '-x 16 -s 16 -k 2M'") + else: + discard execShellCmd(&"youtube-dl {args.join(\" \")}") proc offerSelection(searchResults: SearchResults, options: Table[string, bool], selectionRange: SelectionRange): string =