mirror of
https://github.com/wkulhanek/bonob.git
synced 2025-12-21 17:33:29 +01:00
Genre with id and name, rather than just name
This commit is contained in:
11
src/smapi.ts
11
src/smapi.ts
@@ -10,6 +10,7 @@ import {
|
||||
Album,
|
||||
AlbumSummary,
|
||||
ArtistSummary,
|
||||
Genre,
|
||||
MusicLibrary,
|
||||
MusicService,
|
||||
slice2,
|
||||
@@ -184,10 +185,10 @@ const container = ({
|
||||
title,
|
||||
});
|
||||
|
||||
const genre = (genre: string) => ({
|
||||
const genre = (genre: Genre) => ({
|
||||
itemType: "container",
|
||||
id: `genre:${genre}`,
|
||||
title: genre,
|
||||
id: `genre:${genre.id}`,
|
||||
title: genre.name,
|
||||
});
|
||||
|
||||
export const defaultAlbumArtURI = (
|
||||
@@ -235,8 +236,8 @@ export const track = (
|
||||
artist: track.artist.name,
|
||||
artistId: track.artist.id,
|
||||
duration: track.duration,
|
||||
genre: track.album.genre,
|
||||
// genreId
|
||||
genre: track.album.genre?.name,
|
||||
genreId: track.album.genre?.id,
|
||||
trackNumber: track.number,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user