## Installation
Nim Coon depends on the following:
-- youtube-dl
+- yt-dlp
- mpv (recommended) or vlc
- peerflix and webtorrent (for magnet links)
Install MPV or VLC using your distribution's package manager.
-Install YouTube-dl
+Install yt-dlp
``` sh
-pip3 install --user youtube-dl
+pip3 install --user yt-dlp
```
Install PeerFlix and WebTorrent
proc download*(args: openArray[string], title: string) =
printTitle("Downloading", title)
- discard execShellCmd(&"youtube-dl {args.join(\" \")}")
+ discard execShellCmd(&"yt-dlp {args.join(\" \")}")
proc directDownload*(url: string, options: Options) =
let args = buildDownloadArgs(url, options)
if "aria2c".isInstalled:
- discard execShellCmd(&"youtube-dl {args.join(\" \")} --external-downloader aria2c --external-downloader-args '-x 16 -s 16 -k 2M'")
+ discard execShellCmd(&"yt-dlp {args.join(\" \")} --external-downloader aria2c --external-downloader-args '-x 16 -s 16 -k 2M'")
else:
- discard execShellCmd(&"youtube-dl {args.join(\" \")}")
+ discard execShellCmd(&"yt-dlp {args.join(\" \")}")
proc luckyDownload*(searchQuery: string, options: Options) =
- let args = @[&"ytsearch:\"{searchQuery}\""] & buildDownloadArgs("", options)
- let title = execProcess(&"youtube-dl --get-title {args.join(\" \")}").split("\n")[0]
+ let args = @[&"ytsearch1:\"{searchQuery}\""] & buildDownloadArgs("", options)
+ let title = execProcess(&"yt-dlp --get-title {args.join(\" \")}").split("\n")[0]
download(args, title)
proc luckyPlay*(searchQuery: string, player: string, options: Options) =
let args = @[&"ytsearch:\"{searchQuery}\""] & buildDownloadArgs("", options)
- let output = execProcess(&"youtube-dl --get-url --get-title {args.join(\" \")}").split("\n")
+ let output = execProcess(&"yt-dlp --get-url --get-title {args.join(\" \")}").split("\n")
let
title = output[0]
url = &"\"{output[1]}\""