feat: top genres report

This commit is contained in:
Julian Tölle 2021-10-26 20:09:52 +02:00
parent 62119d44b0
commit a0c28e2324
21 changed files with 317 additions and 104 deletions

View file

@ -5,13 +5,6 @@ import { SimplifiedArtistObject } from "./simplified-artist-object";
// tslint:disable: variable-name
export class AlbumObject {
/**
* A list of the genres used to classify the album.
* For example: "Prog Rock" , "Post-Grunge".
* (If not yet classified, the array is empty.)
*/
genres: string[];
/**
* The artists of the album.
* Each artist object includes a link in href to more detailed information about the artist.

View file

@ -210,14 +210,9 @@ export class SpotifyService {
)
);
const genres = await Promise.all(
spotifyAlbum.genres.map((genreName) => this.importGenre(genreName))
);
return this.musicLibraryService.createAlbum({
name: spotifyAlbum.name,
artists,
genres,
spotify: {
id: spotifyAlbum.id,
uri: spotifyAlbum.uri,