fix: play segments
This commit is contained in:
@@ -83,6 +83,8 @@ func (c *Controller) MediaIndex(ctx fiber.Ctx) error {
|
||||
return errorx.RequestUnAuthorized
|
||||
}
|
||||
|
||||
// c.Locals(consts.CtxKeyJwt, token)
|
||||
token := fiber.Locals[string](ctx, consts.CtxKeyJwt)
|
||||
model, err := c.svc.GetMediaByHash(ctx.Context(), claim.TenantID, hash)
|
||||
if err != nil {
|
||||
log.WithField("action", "medias.MediaIndex").WithError(err).Error("GetMediaByHash")
|
||||
@@ -95,7 +97,7 @@ func (c *Controller) MediaIndex(ctx fiber.Ctx) error {
|
||||
return err
|
||||
}
|
||||
|
||||
playlist, err := c.svc.GetM3U8(ctx.Context(), claim.TenantID, mediaType, model.Hash, bought)
|
||||
playlist, err := c.svc.GetM3U8(ctx.Context(), claim.TenantID, mediaType, model.Hash, bought, token)
|
||||
if err != nil {
|
||||
log.WithField("action", "medias.MediaIndex").WithError(err).Error("GetMediaPlaylist")
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user