Change IXarea Api Endpoint
This commit is contained in:
parent
62e36ef228
commit
c25055f875
@ -136,11 +136,12 @@ async function queryKeyInfo(keyData, filename, format) {
|
|||||||
async function queryAlbumCoverImage(artist, title, album) {
|
async function queryAlbumCoverImage(artist, title, album) {
|
||||||
const song_query_url = IXAREA_API_ENDPOINT + "/music/qq-cover"
|
const song_query_url = IXAREA_API_ENDPOINT + "/music/qq-cover"
|
||||||
try {
|
try {
|
||||||
const resp = await fetch(song_query_url, {
|
const params = {Artist: artist, Title: title, Album: album};
|
||||||
method: "POST",
|
let _url = song_query_url + "?";
|
||||||
headers: {"Content-Type": "application/json"},
|
for (let pKey in params) {
|
||||||
body: JSON.stringify({Artist: artist, Title: title, Album: album}),
|
_url += pKey + "=" + encodeURIComponent(params[pKey]) + "&"
|
||||||
})
|
}
|
||||||
|
const resp = await fetch(_url)
|
||||||
if (resp.ok) {
|
if (resp.ok) {
|
||||||
let data = await resp.json();
|
let data = await resp.json();
|
||||||
return song_query_url + "/" + data.Type + "/" + data.Id
|
return song_query_url + "/" + data.Type + "/" + data.Id
|
||||||
|
Loading…
Reference in New Issue
Block a user