update dependencies
This commit is contained in:
parent
f71c53c7dd
commit
5cd9c89c69
2
go.mod
2
go.mod
@ -2,4 +2,4 @@ module gitlab.com/balki/ytui
|
||||
|
||||
go 1.18
|
||||
|
||||
require golang.org/x/net v0.2.0
|
||||
require golang.org/x/net v0.5.0
|
||||
|
4
go.sum
4
go.sum
@ -1,2 +1,2 @@
|
||||
golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU=
|
||||
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
|
||||
golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw=
|
||||
golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
|
||||
|
10
main.go
10
main.go
@ -30,7 +30,7 @@ var assetsFS embed.FS
|
||||
var (
|
||||
ytdlCmd = []string{"youtube-dl"}
|
||||
videosPath = "./vids"
|
||||
videosUrl = "/vids"
|
||||
videosURL = "/vids"
|
||||
cachePath = "./cache"
|
||||
assetsPath = "./assets"
|
||||
saveAssets = false
|
||||
@ -46,7 +46,7 @@ func parse() {
|
||||
flag.StringVar(&ytcmd, "ytdlcmd", ytcmd, "youtube-dl command seperated by spaces")
|
||||
flag.StringVar(&title, "title", title, "Title of the page")
|
||||
flag.StringVar(&videosPath, "videospath", videosPath, "Path where videos are saved")
|
||||
flag.StringVar(&videosUrl, "videosurl", videosUrl, "Prefix of the url, i.e. https://domain.com/<this var>/<video filename>")
|
||||
flag.StringVar(&videosURL, "videosurl", videosURL, "Prefix of the url, i.e. https://domain.com/<this var>/<video filename>")
|
||||
flag.StringVar(&cachePath, "cachepath", cachePath, "Path where temporary download files are saved")
|
||||
flag.StringVar(&dbPath, "dbpath", dbPath, "Path where downloaded info is saved")
|
||||
flag.StringVar(&assetsPath, "assetspath", assetsPath, "Path where css files are saved and served")
|
||||
@ -112,9 +112,9 @@ func main() {
|
||||
case http.MethodGet:
|
||||
td := struct {
|
||||
Title string
|
||||
VidoesUrl string
|
||||
VidoesURL string
|
||||
Items []db.Item
|
||||
}{title, videosUrl, nil}
|
||||
}{title, videosURL, nil}
|
||||
d.Run(func(jd *db.Jdb) {
|
||||
//reverse order
|
||||
for _, item := range jd.Items {
|
||||
@ -153,7 +153,7 @@ func main() {
|
||||
id, err := strconv.Atoi(idStr)
|
||||
if err != nil {
|
||||
log.Printf("Invalid id, %q, err:%v\n", idStr, err)
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
var sc <-chan string
|
||||
|
Loading…
Reference in New Issue
Block a user