TODO Auto Recreate/Recheck after x dates or button to force refresh
Searches for
queryon Musicbrainz, returningObservable<JSON>oflimitnumber of results. GetArrayof results by subscribing and callingresult['artists'].
TODO: return
Array[artists]directly.
Searches for all recordings by
artistIdon Musicbrainz, returningObservable<Object[]>. GetArrayof results by subscribing.
Returns as an
Objectonly necessary fields (name,id) from rawresult['artists']['artist']query fromsearchService.artists().
artist = {
name : Dua Lipa,
id :6f1a58bf-9b1b-49cf-a44a-6cefad7ae04f
}
Returns as an
Objectonly necessary fields (code,title,id) from raw query fromsearchService.recordings().
recordings = {
...,
[
code : rollindidyousee,
title : Rollin'/Did You See,
id : 42087b88-6841-4988-b4b7-766a475131a1
],
...
}
Note:
codeis the unique identifier. There may be many recordings of the same song under different circumstances (e.g. location), all with their ownid. The includedidis just from one of them.
Checks if
artistexists in Database, and adds if it does not.
Gets
Observableartist ofartistId. Get recordings by subscribing and callingartist.data().recordings.
Adds
recordingsto artist ofartistId. Usesfilterto remove recordings that already exist in database, then adds them. (However, it is probably faster and more efficient to justset(recordings)straightaway.)
This project was generated with Angular CLI version 8.3.3.
Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.
Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.
Run ng test to execute the unit tests via Karma.
Run ng e2e to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help or go check out the Angular CLI README.