If no user agent is specified, the default FFmpeg or VLC user agent is used.

This commit is contained in:
marmei
2020-01-24 19:48:29 +01:00
parent 1b425018d4
commit 4b9f5826cf
2 changed files with 8 additions and 3 deletions

View File

@@ -1429,7 +1429,9 @@ func thirdPartyBuffer(streamID int, playlistID string) {
case "FFMPEG": case "FFMPEG":
a = strings.Replace(a, "[URL]", url, -1) a = strings.Replace(a, "[URL]", url, -1)
if i == 0 { if i == 0 {
args = []string{"-user-agent", Settings.UserAgent} if len(Settings.UserAgent) != 0 {
args = []string{"-user-agent", Settings.UserAgent}
}
} }
args = append(args, a) args = append(args, a)
@@ -1438,7 +1440,10 @@ func thirdPartyBuffer(streamID int, playlistID string) {
if a == "[URL]" { if a == "[URL]" {
a = strings.Replace(a, "[URL]", url, -1) a = strings.Replace(a, "[URL]", url, -1)
args = append(args, a) args = append(args, a)
args = append(args, fmt.Sprintf(":http-user-agent=%s", Settings.UserAgent))
if len(Settings.UserAgent) != 0 {
args = append(args, fmt.Sprintf(":http-user-agent=%s", Settings.UserAgent))
}
} else { } else {
args = append(args, a) args = append(args, a)

View File

@@ -39,7 +39,7 @@ var GitHub = GitHubStruct{Branch: "master", User: "xteve-project", Repo: "xTeVe-
const Name = "xTeVe" const Name = "xTeVe"
// Version : Version, die Build Nummer wird in der main func geparst. // Version : Version, die Build Nummer wird in der main func geparst.
const Version = "2.1.1.0115" const Version = "2.1.1.0116"
// DBVersion : Datanbank Version // DBVersion : Datanbank Version
const DBVersion = "2.1.0" const DBVersion = "2.1.0"