fix: remove duplicate BuildStreamURL function
This commit is contained in:
@@ -3,7 +3,6 @@ package shared
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/url"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -44,13 +43,6 @@ type SkipSegment struct {
|
|||||||
End float64 `json:"end"`
|
End float64 `json:"end"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func BuildStreamURL(mode string, token string) string {
|
|
||||||
if token == "" {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
return fmt.Sprintf("/watch/proxy/stream?mode=%s&token=%s", url.QueryEscape(mode), url.QueryEscape(token))
|
|
||||||
}
|
|
||||||
|
|
||||||
func ModeToken(mode string, modeSources map[string]ModeSource) string {
|
func ModeToken(mode string, modeSources map[string]ModeSource) string {
|
||||||
normalizedMode := mode
|
normalizedMode := mode
|
||||||
if _, ok := modeSources[normalizedMode]; !ok {
|
if _, ok := modeSources[normalizedMode]; !ok {
|
||||||
|
|||||||
Reference in New Issue
Block a user