Fixed top result download button not working
This commit is contained in:
parent
972fc007dc
commit
fba98d44a1
10
server/dist/routes/api/get/mainSearch.js
vendored
10
server/dist/routes/api/get/mainSearch.js
vendored
@ -32,29 +32,31 @@ const handler = (req, res) => __awaiter(void 0, void 0, void 0, function* () {
|
|||||||
switch (topResult.type) {
|
switch (topResult.type) {
|
||||||
case 'artist':
|
case 'artist':
|
||||||
topResult.id = originalTopResult.ART_ID;
|
topResult.id = originalTopResult.ART_ID;
|
||||||
topResult.picture = `https://e-cdns-images.dzcdn.net/images/artist/${originalTopResult.ART_PICTURE}/156x156-000000-80-0-0.jpg`;
|
topResult.picture = `https://e-cdns-images.dzcdn.net/images/artist/${originalTopResult.ART_PICTURE}`;
|
||||||
topResult.title = originalTopResult.ART_NAME;
|
topResult.title = originalTopResult.ART_NAME;
|
||||||
topResult.nb_fan = originalTopResult.NB_FAN;
|
topResult.nb_fan = originalTopResult.NB_FAN;
|
||||||
break;
|
break;
|
||||||
case 'album':
|
case 'album':
|
||||||
topResult.id = originalTopResult.ALB_ID;
|
topResult.id = originalTopResult.ALB_ID;
|
||||||
topResult.picture = `https://e-cdns-images.dzcdn.net/images/cover/${originalTopResult.ALB_PICTURE}/156x156-000000-80-0-0.jpg`;
|
topResult.picture = `https://e-cdns-images.dzcdn.net/images/cover/${originalTopResult.ALB_PICTURE}`;
|
||||||
topResult.title = originalTopResult.ALB_TITLE;
|
topResult.title = originalTopResult.ALB_TITLE;
|
||||||
topResult.artist = originalTopResult.ART_NAME;
|
topResult.artist = originalTopResult.ART_NAME;
|
||||||
topResult.nb_song = originalTopResult.NUMBER_TRACK;
|
topResult.nb_song = originalTopResult.NUMBER_TRACK;
|
||||||
break;
|
break;
|
||||||
case 'playlist':
|
case 'playlist':
|
||||||
topResult.id = originalTopResult.PLAYLIST_ID;
|
topResult.id = originalTopResult.PLAYLIST_ID;
|
||||||
topResult.picture = `https://e-cdns-images.dzcdn.net/images/${originalTopResult.PICTURE_TYPE}/${originalTopResult.PLAYLIST_PICTURE}/156x156-000000-80-0-0.jpg`;
|
topResult.picture = `https://e-cdns-images.dzcdn.net/images/${originalTopResult.PICTURE_TYPE}/${originalTopResult.PLAYLIST_PICTURE}`;
|
||||||
topResult.title = originalTopResult.TITLE;
|
topResult.title = originalTopResult.TITLE;
|
||||||
topResult.artist = originalTopResult.PARENT_USERNAME;
|
topResult.artist = originalTopResult.PARENT_USERNAME;
|
||||||
topResult.nb_song = originalTopResult.NB_SONG;
|
topResult.nb_song = originalTopResult.NB_SONG;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
topResult.id = '0';
|
topResult.id = '0';
|
||||||
topResult.picture = 'https://e-cdns-images.dzcdn.net/images/cover/156x156-000000-80-0-0.jpg';
|
topResult.picture = 'https://e-cdns-images.dzcdn.net/images/cover';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
topResult.picture += '/156x156-000000-80-0-0.jpg';
|
||||||
|
topResult.link = `https://deezer.com/${topResult.type}/${topResult.id}`;
|
||||||
results.TOP_RESULT = [topResult];
|
results.TOP_RESULT = [topResult];
|
||||||
}
|
}
|
||||||
results.ORDER = order;
|
results.ORDER = order;
|
||||||
|
@ -23,29 +23,31 @@ const handler: ApiHandler['handler'] = async (req, res) => {
|
|||||||
switch (topResult.type) {
|
switch (topResult.type) {
|
||||||
case 'artist':
|
case 'artist':
|
||||||
topResult.id = originalTopResult.ART_ID
|
topResult.id = originalTopResult.ART_ID
|
||||||
topResult.picture = `https://e-cdns-images.dzcdn.net/images/artist/${originalTopResult.ART_PICTURE}/156x156-000000-80-0-0.jpg`
|
topResult.picture = `https://e-cdns-images.dzcdn.net/images/artist/${originalTopResult.ART_PICTURE}`
|
||||||
topResult.title = originalTopResult.ART_NAME
|
topResult.title = originalTopResult.ART_NAME
|
||||||
topResult.nb_fan = originalTopResult.NB_FAN
|
topResult.nb_fan = originalTopResult.NB_FAN
|
||||||
break
|
break
|
||||||
case 'album':
|
case 'album':
|
||||||
topResult.id = originalTopResult.ALB_ID
|
topResult.id = originalTopResult.ALB_ID
|
||||||
topResult.picture = `https://e-cdns-images.dzcdn.net/images/cover/${originalTopResult.ALB_PICTURE}/156x156-000000-80-0-0.jpg`
|
topResult.picture = `https://e-cdns-images.dzcdn.net/images/cover/${originalTopResult.ALB_PICTURE}`
|
||||||
topResult.title = originalTopResult.ALB_TITLE
|
topResult.title = originalTopResult.ALB_TITLE
|
||||||
topResult.artist = originalTopResult.ART_NAME
|
topResult.artist = originalTopResult.ART_NAME
|
||||||
topResult.nb_song = originalTopResult.NUMBER_TRACK
|
topResult.nb_song = originalTopResult.NUMBER_TRACK
|
||||||
break
|
break
|
||||||
case 'playlist':
|
case 'playlist':
|
||||||
topResult.id = originalTopResult.PLAYLIST_ID
|
topResult.id = originalTopResult.PLAYLIST_ID
|
||||||
topResult.picture = `https://e-cdns-images.dzcdn.net/images/${originalTopResult.PICTURE_TYPE}/${originalTopResult.PLAYLIST_PICTURE}/156x156-000000-80-0-0.jpg`
|
topResult.picture = `https://e-cdns-images.dzcdn.net/images/${originalTopResult.PICTURE_TYPE}/${originalTopResult.PLAYLIST_PICTURE}`
|
||||||
topResult.title = originalTopResult.TITLE
|
topResult.title = originalTopResult.TITLE
|
||||||
topResult.artist = originalTopResult.PARENT_USERNAME
|
topResult.artist = originalTopResult.PARENT_USERNAME
|
||||||
topResult.nb_song = originalTopResult.NB_SONG
|
topResult.nb_song = originalTopResult.NB_SONG
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
topResult.id = '0'
|
topResult.id = '0'
|
||||||
topResult.picture = 'https://e-cdns-images.dzcdn.net/images/cover/156x156-000000-80-0-0.jpg'
|
topResult.picture = 'https://e-cdns-images.dzcdn.net/images/cover'
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
topResult.picture += '/156x156-000000-80-0-0.jpg'
|
||||||
|
topResult.link = `https://deezer.com/${topResult.type}/${topResult.id}`
|
||||||
results.TOP_RESULT = [topResult]
|
results.TOP_RESULT = [topResult]
|
||||||
}
|
}
|
||||||
results.ORDER = order
|
results.ORDER = order
|
||||||
|
2
webui
2
webui
@ -1 +1 @@
|
|||||||
Subproject commit bd22aef8cc1c00d8446f5d3a518e5552acba133d
|
Subproject commit 1b369da0b9f3e046313e6c09ec577e723ebfe92d
|
Loading…
Reference in New Issue
Block a user