Skip to content

Commit

Permalink
use Uint8Array
Browse files Browse the repository at this point in the history
  • Loading branch information
zefir-git committed Jul 20, 2024
1 parent f2f0c00 commit f544f76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/resource/Track.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Track extends ApiResource {
}
}

public async cover(): Promise<{ type: string, data: Buffer } | null> {
public async cover(): Promise<{ type: string, data: Uint8Array } | null> {
const meta = await getMetadataFromFile(this.file.path);
if (meta.common.picture === undefined || meta.common.picture!.length === 0) return null;
const pic = meta.common.picture!.length === 1 ? meta.common.picture![0] : meta.common.picture!.find(p => ["cover", "front", "album"].some(t => p.type?.toLowerCase().includes(t)));
Expand Down

0 comments on commit f544f76

Please sign in to comment.