mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 21:21:02 +00:00
feat: top genres report
This commit is contained in:
parent
62119d44b0
commit
a0c28e2324
21 changed files with 317 additions and 104 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue