mirror of
https://github.com/teacat/chaturbate-dvr.git
synced 2025-10-29 16:59:59 +00:00
Fixed #53, separate usernames with commas
This commit is contained in:
parent
9400591c6f
commit
acb1dff0cc
@ -1,20 +1,4 @@
|
||||
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
|
||||
```
|
||||
|
||||
Compile 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
|
||||
```
|
||||
|
||||
or Compile All at once:
|
||||
Compile All at once:
|
||||
|
||||
```
|
||||
GOOS=windows GOARCH=amd64 go build -o bin/windows/chatubrate-dvr.exe &&
|
||||
@ -24,3 +8,19 @@ 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 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
|
||||
```
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -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)
|
||||
|
||||
@ -41,6 +41,7 @@
|
||||
<div class="label">chaturbate.com/</div>
|
||||
<input type="text" autofocus x-model="form_data.username" />
|
||||
</div>
|
||||
<div class="ts-text is-description has-top-spaced-small">Use commas to separate multiple channel names. For example, "channel1,channel2,channel3".</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- / Field: Channel Username -->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user