|
|
@ -2,7 +2,6 @@ package tgbotapi |
|
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
import ( |
|
|
|
"encoding/json" |
|
|
|
"encoding/json" |
|
|
|
"fmt" |
|
|
|
|
|
|
|
"io" |
|
|
|
"io" |
|
|
|
"net/url" |
|
|
|
"net/url" |
|
|
|
"strconv" |
|
|
|
"strconv" |
|
|
@ -462,7 +461,6 @@ func (config VideoConfig) values() (url.Values, error) { |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return v, err |
|
|
|
return v, err |
|
|
|
} |
|
|
|
} |
|
|
|
fmt.Println() |
|
|
|
|
|
|
|
v.Add(config.name(), config.FileID) |
|
|
|
v.Add(config.name(), config.FileID) |
|
|
|
if config.Duration != 0 { |
|
|
|
if config.Duration != 0 { |
|
|
|
v.Add("duration", strconv.Itoa(config.Duration)) |
|
|
|
v.Add("duration", strconv.Itoa(config.Duration)) |
|
|
@ -475,6 +473,8 @@ func (config VideoConfig) values() (url.Values, error) { |
|
|
|
} |
|
|
|
} |
|
|
|
if config.SupportsStreaming { |
|
|
|
if config.SupportsStreaming { |
|
|
|
v.Add("supports_streaming", "true") |
|
|
|
v.Add("supports_streaming", "true") |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
v.Add("supports_streaming", "false") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return v, nil |
|
|
|
return v, nil |
|
|
@ -490,6 +490,11 @@ func (config VideoConfig) params() (map[string]string, error) { |
|
|
|
params["parse_mode"] = config.ParseMode |
|
|
|
params["parse_mode"] = config.ParseMode |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if config.SupportsStreaming { |
|
|
|
|
|
|
|
params["supports_streaming"] = "true" |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
params["supports_streaming"] = "false" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return params, nil |
|
|
|
return params, nil |
|
|
|
} |
|
|
|
} |
|
|
|