X-Git-Url: https://njoseph.me/gitweb/nimcoon.git/blobdiff_plain/8d06ad6913cf2c0a0714523d6925d3038950f50a..d7688e977df2d65d032a5535318a4a913bee625f:/src/lib.nim diff --git a/src/lib.nim b/src/lib.nim index 0a008b8..24aa930 100644 --- a/src/lib.nim +++ b/src/lib.nim @@ -106,7 +106,7 @@ func sanitizeURL*(url: string): string = urlLongen(stripZshEscaping(url)) proc directPlay*(url: string, player: string, options: Table[string, bool]) = - if url.startswith("magnet:"): + if url.startswith("magnet:") or url.endswith(".torrent"): if options["musicOnly"]: # TODO Replace with WebTorrent once it supports media player options discard execShellCmd(&"peerflix '{url}' -a --{player} -- --no-video")