diff --git a/README_DEV.md b/README_DEV.md index 0ba47af..6ec37ee 100644 --- a/README_DEV.md +++ b/README_DEV.md @@ -1,25 +1,25 @@ -Compile for 64-bit Windows, macOS, Linux: +Compile All at once: ``` GOOS=windows GOARCH=amd64 go build -o bin/windows/chatubrate-dvr.exe && GOOS=darwin GOARCH=amd64 go build -o bin/darwin/chatubrate-dvr && -GOOS=linux GOARCH=amd64 go build -o bin/linux/chatubrate-dvr -``` - -Compile for arm64 Windows, macOS, Linux: - -``` +GOOS=linux GOARCH=amd64 go build -o bin/linux/chatubrate-dvr && GOOS=windows GOARCH=arm64 go build -o bin/arm64/windows/chatubrate-dvr.exe && GOOS=darwin GOARCH=arm64 go build -o bin/arm64/darwin/chatubrate-dvr && GOOS=linux GOARCH=arm64 go build -o bin/arm64/linux/chatubrate-dvr ``` -or Compile All at once: +or Compile for 64-bit Windows, macOS, Linux: ``` GOOS=windows GOARCH=amd64 go build -o bin/windows/chatubrate-dvr.exe && GOOS=darwin GOARCH=amd64 go build -o bin/darwin/chatubrate-dvr && -GOOS=linux GOARCH=amd64 go build -o bin/linux/chatubrate-dvr && +GOOS=linux GOARCH=amd64 go build -o bin/linux/chatubrate-dvr +``` + +or for arm64 Windows, macOS, Linux: + +``` GOOS=windows GOARCH=arm64 go build -o bin/arm64/windows/chatubrate-dvr.exe && GOOS=darwin GOARCH=arm64 go build -o bin/arm64/darwin/chatubrate-dvr && GOOS=linux GOARCH=arm64 go build -o bin/arm64/linux/chatubrate-dvr diff --git a/bin/arm64/darwin/chatubrate-dvr b/bin/arm64/darwin/chatubrate-dvr index fb4c98e..24932a1 100755 Binary files a/bin/arm64/darwin/chatubrate-dvr and b/bin/arm64/darwin/chatubrate-dvr differ diff --git a/bin/arm64/linux/chatubrate-dvr b/bin/arm64/linux/chatubrate-dvr index 3389534..c891b3e 100755 Binary files a/bin/arm64/linux/chatubrate-dvr and b/bin/arm64/linux/chatubrate-dvr differ diff --git a/bin/arm64/windows/chatubrate-dvr.exe b/bin/arm64/windows/chatubrate-dvr.exe index 48537d8..5476fcf 100755 Binary files a/bin/arm64/windows/chatubrate-dvr.exe and b/bin/arm64/windows/chatubrate-dvr.exe differ diff --git a/bin/darwin/chatubrate-dvr b/bin/darwin/chatubrate-dvr index ccad4c2..86f4b4e 100755 Binary files a/bin/darwin/chatubrate-dvr and b/bin/darwin/chatubrate-dvr differ diff --git a/bin/linux/chatubrate-dvr b/bin/linux/chatubrate-dvr index ebcf4a3..4a91ace 100755 Binary files a/bin/linux/chatubrate-dvr and b/bin/linux/chatubrate-dvr differ diff --git a/bin/windows/chatubrate-dvr.exe b/bin/windows/chatubrate-dvr.exe index aaa59d9..2e43cc7 100755 Binary files a/bin/windows/chatubrate-dvr.exe and b/bin/windows/chatubrate-dvr.exe differ diff --git a/handler/create_channel.go b/handler/create_channel.go index d3ac4e3..634e668 100644 --- a/handler/create_channel.go +++ b/handler/create_channel.go @@ -2,6 +2,7 @@ package handler import ( "net/http" + "strings" "github.com/gin-gonic/gin" "github.com/teacat/chaturbate-dvr/chaturbate" @@ -48,17 +49,20 @@ func (h *CreateChannelHandler) Handle(c *gin.Context) { c.AbortWithError(http.StatusBadRequest, err) return } - if err := h.chaturbate.CreateChannel(&chaturbate.Config{ - Username: req.Username, - Framerate: req.Framerate, - Resolution: req.Resolution, - ResolutionFallback: req.ResolutionFallback, - FilenamePattern: req.FilenamePattern, - SplitDuration: req.SplitDuration, - SplitFilesize: req.SplitFilesize, - }); err != nil { - c.AbortWithError(http.StatusInternalServerError, err) - return + usernames := strings.Split(req.Username, ",") + for _, username := range usernames { + if err := h.chaturbate.CreateChannel(&chaturbate.Config{ + Username: strings.TrimSpace(username), + Framerate: req.Framerate, + Resolution: req.Resolution, + ResolutionFallback: req.ResolutionFallback, + FilenamePattern: req.FilenamePattern, + SplitDuration: req.SplitDuration, + SplitFilesize: req.SplitFilesize, + }); err != nil { + c.AbortWithError(http.StatusInternalServerError, err) + return + } } if err := h.chaturbate.SaveChannels(); err != nil { c.AbortWithError(http.StatusInternalServerError, err) diff --git a/handler/view/index.html b/handler/view/index.html index 08e9ca8..23e4b08 100644 --- a/handler/view/index.html +++ b/handler/view/index.html @@ -41,6 +41,7 @@