mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-10-29 09:44:42 +00:00
server: better structure album tracks endpoint
- client: add now-playing and recommendations to home right-sidebar
This commit is contained in:
1 parent
73dec9189e
commit
195a50382a
12 files changed
+298
-318
No files matched your search
+12
-12
@@ -3,10 +3,10 @@ let base_uri = "http://0.0.0.0:9876";
|
||||
const getAlbumTracks = async (name, artist) => {
|
||||
const res = await fetch(
|
||||
base_uri +
|
||||
"/albums/" +
|
||||
encodeURIComponent(name.replaceAll("/", "|")) +
|
||||
"::" +
|
||||
encodeURIComponent(artist.replaceAll("/", "|"))
|
||||
"/album/" +
|
||||
encodeURIComponent(name) + "/" +
|
||||
encodeURIComponent(artist) +
|
||||
"/tracks"
|
||||
);
|
||||
|
||||
if (!res.ok) {
|
||||
@@ -38,14 +38,14 @@ const getAlbumArtists = async (name, artist) => {
|
||||
return data.artists;
|
||||
};
|
||||
|
||||
const getAlbumBio = async(name, artist) => {
|
||||
const getAlbumBio = async (name, artist) => {
|
||||
const res = await fetch(
|
||||
base_uri +
|
||||
"/album/" +
|
||||
encodeURIComponent(name.replaceAll("/", "|")) +
|
||||
"/" +
|
||||
encodeURIComponent(artist.replaceAll("/", "|")) +
|
||||
"/bio"
|
||||
base_uri +
|
||||
"/album/" +
|
||||
encodeURIComponent(name.replaceAll("/", "|")) +
|
||||
"/" +
|
||||
encodeURIComponent(artist.replaceAll("/", "|")) +
|
||||
"/bio"
|
||||
);
|
||||
|
||||
if (!res.ok) {
|
||||
@@ -60,5 +60,5 @@ const getAlbumBio = async(name, artist) => {
|
||||
export default {
|
||||
getAlbumTracks,
|
||||
getAlbumArtists,
|
||||
getAlbumBio
|
||||
getAlbumBio,
|
||||
};
|
||||
Reference in new issue
Block a user