]> njoseph.me Git - nimcoon.git/commitdiff
Stream magnet links using peerflix
authorJoseph Nuthalapati <njoseph@riseup.net>
Mon, 23 Dec 2019 13:47:22 +0000 (19:17 +0530)
committerJoseph Nuthalapati <njoseph@riseup.net>
Mon, 23 Dec 2019 13:47:22 +0000 (19:17 +0530)
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
README.md
clitube.nim

index 3930178a8f6247169c57a229f11e252716b107ad..e2174f3481c7cf5ffa7e2f83940fac73d5d9c8ef 100644 (file)
--- a/README.md
+++ b/README.md
@@ -13,6 +13,8 @@ only the standard library.
 - [x] Search for videos using keywords
 - [x] Stream videos
 - [x] Stream music
+- [x] Play direct links from YouTube and PeerTube
+- [x] Stream video from magnet links
 - [ ] Download video
 - [ ] Download music
 - [ ] Configuration options
@@ -23,6 +25,7 @@ only the standard library.
 CLI Tube depends on the following:
 - youtube-dl
 - mpv (recommended) or vlc
+- peerflix (for magnet links)
 
 Download the latest build from GitlabCI (amd64 GNU/Linux only).
 
index cc354483cdba5a8faab5b59c7bac86f32086799f..1c30b92e75384ce5748eb904ee87a4b1b0f75abe 100644 (file)
@@ -61,6 +61,11 @@ if "?watch" in searchQuery or "videos/watch" in searchQuery :
   quit(0)
 
 
+if searchQuery.startswith("magnet:"):
+  discard execProcess(&"peerflix \"{searchQuery}\" --{player}")
+  quit(0)
+
+
 let searchResults = extractTitlesAndUrls(getYoutubePage(searchQuery))
 
 let number =