]> njoseph.me Git - nimcoon.git/blobdiff - src/lib.nim
Start replacing PeerFlix with WebTorrent
[nimcoon.git] / src / lib.nim
index 4305b2cbb1c0387cee28ce38887608d744009608..0a008b832ef556390f2d4f91dde86a6038d56aeb 100644 (file)
@@ -108,9 +108,11 @@ func sanitizeURL*(url: string): string =
 proc directPlay*(url: string, player: string, options: Table[string, bool]) =
   if url.startswith("magnet:"):
     if options["musicOnly"]:
+      # TODO Replace with WebTorrent once it supports media player options
       discard execShellCmd(&"peerflix '{url}' -a --{player} -- --no-video")
     else:
-      discard execProcess("peerflix", args=[url, &"--{player}"], options=processOptions)
+      # WebTorrent is so much faster!
+      discard execProcess("webtorrent", args=[url, &"--{player}"], options=processOptions)
   else:
     play(player, options, url)