From f634513dc85352c12848bf76556275791b39bb2e Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Jacquier Date: Wed, 28 Aug 2019 17:27:08 +0000 Subject: [PATCH] fixup! fixup! fixup! Add xtream /get.php Signed-off-by: Pierre-Emmanuel Jacquier --- pkg/routes/xtream.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/routes/xtream.go b/pkg/routes/xtream.go index 893b133..ce53297 100644 --- a/pkg/routes/xtream.go +++ b/pkg/routes/xtream.go @@ -6,6 +6,7 @@ import ( "log" "net/http" "net/url" + "strings" "time" "github.com/gin-gonic/gin" @@ -15,7 +16,7 @@ import ( ) func (p *proxy) xtreamGet(c *gin.Context) { - rawURL := fmt.Sprintf("%s/get.php?username=%s&password%s", p.XtreamBaseURL, p.XtreamUser, p.XtreamPassword) + rawURL := fmt.Sprintf("%s/get.php?username=%s&password=%s", p.XtreamBaseURL, p.XtreamUser, p.XtreamPassword) q := c.Request.URL.Query() @@ -24,7 +25,7 @@ func (p *proxy) xtreamGet(c *gin.Context) { continue } - rawURL = fmt.Sprintf("%s&%s=%s", rawURL, k, v) + rawURL = fmt.Sprintf("%s&%s=%s", rawURL, k, strings.Join(v, ",")) } m3uURL, err := url.Parse(rawURL) @@ -33,8 +34,6 @@ func (p *proxy) xtreamGet(c *gin.Context) { return } - println("debug:", m3uURL.String()) - playlist, err := m3u.Parse(m3uURL.String()) if err != nil { c.AbortWithError(http.StatusInternalServerError, err)