feat(meta): add writing metadata by ffmpeg

This commit is contained in:
Unlock Music Dev committed 2022-12-06 21:52:19 +08:00
1 parent 8319df6ca3
commit 02e065aac4
3 files changed
+263 -11

No files matched your search

+1 -5
View File
@@ -4,7 +4,6 @@ import (
"context"
"errors"
"fmt"
"io"
"strings"
"github.com/samber/lo"
@@ -102,10 +101,7 @@ func (d *Decoder) GetCoverImage(ctx context.Context) ([]byte, error) {
return nil, fmt.Errorf("qmc[GetCoverImage] extract album art: %w", err)
}
d.cover, err = io.ReadAll(img)
if err != nil {
return nil, fmt.Errorf("qmc[GetCoverImage] read embed cover: %w", err)
}
d.cover = img.Bytes()
return d.cover, nil
}