mirror of
https://github.com/wkulhanek/bonob.git
synced 2025-12-21 17:33:29 +01:00
Ability to play entire album
This commit is contained in:
@@ -477,7 +477,6 @@ export class Navidrome implements MusicService {
|
|||||||
} else {
|
} else {
|
||||||
return navidrome.getArtistWithInfo(credentials, id).then((artist) => {
|
return navidrome.getArtistWithInfo(credentials, id).then((artist) => {
|
||||||
if (artist.image.large) {
|
if (artist.image.large) {
|
||||||
console.log(`fetching from ${artist.image.large}`);
|
|
||||||
return axios
|
return axios
|
||||||
.get(artist.image.large!, {
|
.get(artist.image.large!, {
|
||||||
headers: BROWSER_HEADERS,
|
headers: BROWSER_HEADERS,
|
||||||
@@ -501,9 +500,6 @@ export class Navidrome implements MusicService {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (artist.albums.length > 0) {
|
} else if (artist.albums.length > 0) {
|
||||||
console.log(
|
|
||||||
`gettin cover art for artist album id = ${artist.albums[0]!.id}`
|
|
||||||
);
|
|
||||||
return navidrome
|
return navidrome
|
||||||
.getCoverArt(credentials, artist.albums[0]!.id, size)
|
.getCoverArt(credentials, artist.albums[0]!.id, size)
|
||||||
.then((res) => ({
|
.then((res) => ({
|
||||||
|
|||||||
@@ -234,6 +234,7 @@ const album = (
|
|||||||
id: `album:${album.id}`,
|
id: `album:${album.id}`,
|
||||||
title: album.name,
|
title: album.name,
|
||||||
albumArtURI: defaultAlbumArtURI(webAddress, accessToken, album),
|
albumArtURI: defaultAlbumArtURI(webAddress, accessToken, album),
|
||||||
|
canPlay: true
|
||||||
});
|
});
|
||||||
|
|
||||||
export const track = (
|
export const track = (
|
||||||
|
|||||||
@@ -576,6 +576,7 @@ describe("api", () => {
|
|||||||
id: `album:${it.id}`,
|
id: `album:${it.id}`,
|
||||||
title: it.name,
|
title: it.name,
|
||||||
albumArtURI: defaultAlbumArtURI(rootUrl, accessToken, it),
|
albumArtURI: defaultAlbumArtURI(rootUrl, accessToken, it),
|
||||||
|
canPlay: true
|
||||||
})),
|
})),
|
||||||
index: 0,
|
index: 0,
|
||||||
total: artistWithManyAlbums.albums.length,
|
total: artistWithManyAlbums.albums.length,
|
||||||
@@ -601,6 +602,7 @@ describe("api", () => {
|
|||||||
id: `album:${it.id}`,
|
id: `album:${it.id}`,
|
||||||
title: it.name,
|
title: it.name,
|
||||||
albumArtURI: defaultAlbumArtURI(rootUrl, accessToken, it),
|
albumArtURI: defaultAlbumArtURI(rootUrl, accessToken, it),
|
||||||
|
canPlay: true
|
||||||
})),
|
})),
|
||||||
index: 2,
|
index: 2,
|
||||||
total: artistWithManyAlbums.albums.length,
|
total: artistWithManyAlbums.albums.length,
|
||||||
@@ -706,6 +708,7 @@ describe("api", () => {
|
|||||||
id: `album:${it.id}`,
|
id: `album:${it.id}`,
|
||||||
title: it.name,
|
title: it.name,
|
||||||
albumArtURI: defaultAlbumArtURI(rootUrl, accessToken, it),
|
albumArtURI: defaultAlbumArtURI(rootUrl, accessToken, it),
|
||||||
|
canPlay: true
|
||||||
})),
|
})),
|
||||||
index: 0,
|
index: 0,
|
||||||
total: 6,
|
total: 6,
|
||||||
@@ -732,6 +735,7 @@ describe("api", () => {
|
|||||||
id: `album:${it.id}`,
|
id: `album:${it.id}`,
|
||||||
title: it.name,
|
title: it.name,
|
||||||
albumArtURI: defaultAlbumArtURI(rootUrl, accessToken, it),
|
albumArtURI: defaultAlbumArtURI(rootUrl, accessToken, it),
|
||||||
|
canPlay: true
|
||||||
})),
|
})),
|
||||||
index: 2,
|
index: 2,
|
||||||
total: 6,
|
total: 6,
|
||||||
|
|||||||
Reference in New Issue
Block a user