Archived
Yojimbo
This commit is contained in:
+18
-18
@@ -74,7 +74,7 @@ class Wikipedia extends Component {
|
||||
})
|
||||
.then(resRecordingQuery => {
|
||||
let x = resRecordingQuery.data.relations.map(x => x['target-type'] === 'work' ? x.work.id : "").toString();
|
||||
console.log(x,'resRecordingQuery.data true', resRecordingQuery.data)
|
||||
console.log(x, 'resRecordingQuery.data true', resRecordingQuery.data)
|
||||
}, err => { console.error(err) })
|
||||
}
|
||||
, err => console.error(err))
|
||||
@@ -83,28 +83,28 @@ class Wikipedia extends Component {
|
||||
// axios
|
||||
// .get(`${musicbrainzBaseUrl}/release-group/`)
|
||||
// .then(res => { }, err => { })
|
||||
axios
|
||||
.get(`https://musicbrainz.org/ws/2/recording`, {
|
||||
params: {
|
||||
'query': `"${artist.trim()}" AND artistname:"${title.trim()}"`, //rgid:${res.data.}
|
||||
'limit': 1,
|
||||
'fmt': 'json'
|
||||
}
|
||||
})
|
||||
.then(resP175EqTitle => {
|
||||
axios
|
||||
.get(`https://musicbrainz.org/ws/2/recording`, {
|
||||
.get(`${musicbrainzBaseUrl}/recording/${resP175EqTitle.data.recordings[0].id}`, {
|
||||
params: {
|
||||
'query': `"${artist.trim()}" AND artistname:"${title.trim()}"`, //rgid:${res.data.}
|
||||
'limit': 1,
|
||||
'inc': 'work-rels+artists+releases',
|
||||
'fmt': 'json'
|
||||
}
|
||||
})
|
||||
.then(resP175EqTitle => {
|
||||
axios
|
||||
.get(`${musicbrainzBaseUrl}/recording/${resP175EqTitle.data.recordings[0].id}`, {
|
||||
params: {
|
||||
'inc': 'work-rels+artists+releases',
|
||||
'fmt': 'json'
|
||||
}
|
||||
})
|
||||
.then(resRecordingQuery => {
|
||||
let x = resRecordingQuery.data.relations.map(x => x['target-type'] === 'work' ? x.work.id : "").toString();
|
||||
console.log(x, 'resRecordingQuery.data false', resRecordingQuery.data)
|
||||
}, err => { console.error(err) })
|
||||
}
|
||||
, err => console.error(err))
|
||||
.then(resRecordingQuery => {
|
||||
let x = resRecordingQuery.data.relations.map(x => x['target-type'] === 'work' ? x.work.id : "").toString();
|
||||
console.log(x, 'resRecordingQuery.data false', resRecordingQuery.data)
|
||||
}, err => { console.error(err) })
|
||||
}
|
||||
, err => console.error(err))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user