Add download button in the SharePlayer
This commit is contained in:
@@ -122,8 +122,10 @@ func getIndexTemplate(r *http.Request, fs fs.FS) (*template.Template, error) {
|
||||
}
|
||||
|
||||
type shareData struct {
|
||||
Description string `json:"description"`
|
||||
Tracks []shareTrack `json:"tracks"`
|
||||
ID string `json:"id"`
|
||||
Description string `json:"description"`
|
||||
Downloadable bool `json:"downloadable"`
|
||||
Tracks []shareTrack `json:"tracks"`
|
||||
}
|
||||
|
||||
type shareTrack struct {
|
||||
@@ -141,7 +143,9 @@ func addShareData(r *http.Request, data map[string]interface{}, shareInfo *model
|
||||
return
|
||||
}
|
||||
sd := shareData{
|
||||
Description: shareInfo.Description,
|
||||
ID: shareInfo.ID,
|
||||
Description: shareInfo.Description,
|
||||
Downloadable: shareInfo.Downloadable,
|
||||
}
|
||||
sd.Tracks = slice.Map(shareInfo.Tracks, func(mf model.MediaFile) shareTrack {
|
||||
return shareTrack{
|
||||
|
||||
Reference in New Issue
Block a user