mirror of
https://github.com/pierre-emmanuelJ/iptv-proxy.git
synced 2026-03-13 14:46:16 +01:00
Fix auth panic in xtream code
Signed-off-by: Pierre-Emmanuel Jacquier <15922119+pierre-emmanuelJ@users.noreply.github.com>
This commit is contained in:
12
vendor/github.com/tellytv/go.xtream-codes/xtream-codes.go
generated
vendored
12
vendor/github.com/tellytv/go.xtream-codes/xtream-codes.go
generated
vendored
@@ -72,16 +72,24 @@ func NewClient(username, password, baseURL string) (*XtreamClient, error) {
|
||||
// NewClientWithContext returns an initialized XtreamClient with the given values.
|
||||
func NewClientWithContext(ctx context.Context, username, password, baseURL string) (*XtreamClient, error) {
|
||||
c, err := NewClient(username, password, baseURL)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
c.Context = ctx
|
||||
return c, err
|
||||
|
||||
return c, nil
|
||||
}
|
||||
|
||||
// NewClientWithUserAgent returns an initialized XtreamClient with the given values.
|
||||
func NewClientWithUserAgent(ctx context.Context, username, password, baseURL, userAgent string) (*XtreamClient, error) {
|
||||
c, err := NewClient(username, password, baseURL)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
c.UserAgent = userAgent
|
||||
c.Context = ctx
|
||||
return c, err
|
||||
|
||||
return c, nil
|
||||
}
|
||||
|
||||
// GetStreamURL will return a stream URL string for the given streamID and wantedFormat.
|
||||
|
||||
Reference in New Issue
Block a user