Use transcodedContentType when available to indicate to sonos device the transcoded mimeType #191 (#192)

This commit is contained in:
Simon J
2024-02-02 19:43:53 +11:00
committed by GitHub
parent 1a251400ec
commit 66c248fe44
5 changed files with 28 additions and 7 deletions

View File

@@ -163,6 +163,7 @@ export type song = {
bitRate: number | undefined;
suffix: string | undefined;
contentType: string | undefined;
transcodedContentType: string | undefined;
type: string | undefined;
userRating: number | undefined;
starred: string | undefined;
@@ -273,7 +274,7 @@ export const artistImageURN = (
export const asTrack = (album: Album, song: song): Track => ({
id: song.id,
name: song.title,
mimeType: song.contentType!,
mimeType: song.transcodedContentType ? song.transcodedContentType : song.contentType!,
duration: song.duration || 0,
number: song.track || 0,
genre: maybeAsGenre(song.genre),