From 74d23a5ad849f4492112bb5f0833ac6598db8986 Mon Sep 17 00:00:00 2001 From: balki <3070606-balki@users.noreply.gitlab.com> Date: Tue, 14 Jun 2022 21:09:30 -0400 Subject: [PATCH] make prefix configurable --- main.go | 15 ++++++++++++--- templates/index.html | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index cf27f40..8053fbf 100644 --- a/main.go +++ b/main.go @@ -26,6 +26,7 @@ const port = 8080 var ( ytdlCmd = []string{"youtube-dl"} videosPath = "./vids" + videosUrl = "/vids" cachePath = "./cache" dbPath = "./db.json" approval bool = false @@ -37,19 +38,27 @@ func parse() { ytcmd := ytdlCmd[0] flag.StringVar(&ytcmd, "ytdlcmd", ytcmd, "youtube-dl command seperated by spaces") flag.StringVar(&videosPath, "videospath", videosPath, "Path where videos are saved") + flag.StringVar(&videosUrl, "videosurl", videosUrl, "Prefix of the url, i.e. https://domain.com//