Skip to content

Commit

Permalink
Fix extension
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre-Emmanuel Jacquier <[email protected]>
  • Loading branch information
pierre-emmanuelJ committed Jan 3, 2022
1 parent d48a875 commit 5dfcfc2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/server/xtreamHandles.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ func (c *Config) xtreamGenerateM3u(ctx *gin.Context, extension string) (*m3u.Pla
// prefix with "live" if there is an extension.
var prefix string
if extension != "" {
extension = "." + extension
prefix = "live/"
}

Expand Down Expand Up @@ -116,7 +117,7 @@ func (c *Config) xtreamGenerateM3u(ctx *gin.Context, extension string) (*m3u.Pla
track.Tags = append(track.Tags, m3u.Tag{Name: "group-title", Value: category.Name})
}

track.URI = fmt.Sprintf("%s/%s%s/%s/%s.%s", c.XtreamBaseURL, prefix, c.XtreamUser, c.XtreamPassword, fmt.Sprint(stream.ID), extension)
track.URI = fmt.Sprintf("%s/%s%s/%s/%s%s", c.XtreamBaseURL, prefix, c.XtreamUser, c.XtreamPassword, fmt.Sprint(stream.ID), extension)
playlist.Tracks = append(playlist.Tracks, track)
}
}
Expand Down

0 comments on commit 5dfcfc2

Please sign in to comment.