Support http in addition to https
authorJoseph Nuthalapati <njoseph@riseup.net>
Fri, 26 Jun 2020 01:19:18 +0000 (06:49 +0530)
committerJoseph Nuthalapati <njoseph@riseup.net>
Fri, 26 Jun 2020 01:19:18 +0000 (06:49 +0530)
Some of the old YouTube videos still have http links. They will redirect
to https.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
src/nimcoon.nim

index 265409d082a8eb47ec95d684707defbe85ca5dc1..3844d4095de6f043349f9527d586948f89420221 100644 (file)
@@ -45,7 +45,7 @@ proc main() =
   if(not isValidOptions(options)):
     quit(1)
 
-  if searchQuery.startswith("https:") or searchQuery.startswith("magnet:"):
+  if searchQuery.startswith("http") or searchQuery.startswith("magnet"):
     if options["download"]:
       directDownload(sanitizeURL(searchQuery), options["musicOnly"])
     else: