mirror of
https://github.com/teacat/chaturbate-dvr.git
synced 2025-10-29 16:59:59 +00:00
Added ability to add CloudFlare Cookie
This commit is contained in:
parent
866435d061
commit
0dd2f66a74
@ -4,7 +4,6 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"os"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
@ -32,6 +31,8 @@ type Config struct {
|
||||
SplitDuration int
|
||||
SplitFilesize int
|
||||
Interval int
|
||||
CFCookie string
|
||||
UserAgent string
|
||||
}
|
||||
|
||||
// Manager
|
||||
@ -39,10 +40,12 @@ type Manager struct {
|
||||
cli *cli.Context
|
||||
Channels map[string]*Channel
|
||||
Updates map[string]chan *Update
|
||||
|
||||
}
|
||||
|
||||
// NewManager
|
||||
func NewManager(c *cli.Context) *Manager {
|
||||
|
||||
return &Manager{
|
||||
cli: c,
|
||||
Channels: map[string]*Channel{},
|
||||
@ -101,6 +104,8 @@ func (m *Manager) CreateChannel(conf *Config) error {
|
||||
Resolution: conf.Resolution,
|
||||
ResolutionFallback: conf.ResolutionFallback,
|
||||
Interval: conf.Interval,
|
||||
CFCookie: m.cli.String("cf-cookie"),
|
||||
UserAgent: m.cli.String("user-agent"),
|
||||
LastStreamedAt: "-",
|
||||
SegmentDuration: 0,
|
||||
SplitDuration: conf.SplitDuration,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user