- [x] Play direct links from YouTube and PeerTube
- [x] Stream video from magnet links
- [x] Download music
-- [ ] Download video
+- [x] Download video
- [ ] Configuration options
## Installation
-* Task list [6/11]
+* Task list [7/11]
- [X] Pretty colors in terminal
- [X] Get rid of temp file or make one temp file per user
- [X] Preferences should go into a config file
- [X] Create a proper CLI
- [X] PeerTube support (only direct download, because webtorrent seeds are too slow)
- [X] Find a better name. clitube is an SEO disaster
+- [X] Option to download audio/video
- [ ] Spawn video player and quit immediately
- [ ] SoundCloud support? Search and play music
- [ ] LRU cache of content so that frequently-played content doesn't use BW
-- [ ] Option to download audio/video
- [ ] Better CLI using curses - select with arrows and press enter
- - illwill library can be used
- - see nim-mod project as an example
+ - illwill library can be used
+ - see nim-mod project as an example
args.add(searchResults[number].url)
return args
+ func buildVideoDownloadArgs(number: int): seq[string] =
+ {.noSideEffect.}:
+ var args = @["-f", "best", "-o"]
+ let downloadLocation = &"'{expandTilde(videoDownloadDirectory)}/%(title)s.%(ext)s'"
+ args.add(downloadLocation)
+ args.add(searchResults[number].url)
+ return args
+
proc handleUserInput(number: int) =
if options["download"]:
if options["musicOnly"]:
download(buildMusicDownloadArgs(number), searchResults[number].title)
+ else:
+ download(buildVideoDownloadArgs(number), searchResults[number].title)
else:
play(player, buildPlayerArgs(number), searchResults[number].title)