Skip to content

Commit

Permalink
added new old example player
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirari04 committed Jan 17, 2024
1 parent eea3520 commit 5cec2a0
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 645 deletions.
3 changes: 3 additions & 0 deletions controllers/PlayerController.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func PlayerController(c *fiber.Ctx) error {

// List audios
var jsonAudios []map[string]string
var firstAudio string
for _, audioItem := range dbLink.File.Audios {
if audioItem.Ready {
jsonAudios = append(jsonAudios, map[string]string{
Expand All @@ -90,6 +91,7 @@ func PlayerController(c *fiber.Ctx) error {
"lang": audioItem.Lang,
"file": audioItem.OutputFile,
})
firstAudio = audioItem.UUID
}
}
rawAudios, _ := json.Marshal(jsonAudios)
Expand Down Expand Up @@ -140,6 +142,7 @@ func PlayerController(c *fiber.Ctx) error {
"Qualitys": string(rawQuality),
"Subtitles": string(rawSubtitles),
"Audios": string(rawAudios),
"AudioUUID": firstAudio,
"Webhooks": string(rawWebhooks),
"StreamIsReady": streamIsReady,
"UUID": requestValidation.UUID,
Expand Down
Loading

0 comments on commit 5cec2a0

Please sign in to comment.