From 78c1531e01b6abc902ee047c9057a14a58af1a86 Mon Sep 17 00:00:00 2001 From: simojenki Date: Sat, 13 Mar 2021 16:23:35 +1100 Subject: [PATCH] Ability to play entire album --- src/navidrome.ts | 4 ---- src/smapi.ts | 1 + tests/smapi.test.ts | 4 ++++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/navidrome.ts b/src/navidrome.ts index 93e1f3a..33acdd4 100644 --- a/src/navidrome.ts +++ b/src/navidrome.ts @@ -477,7 +477,6 @@ export class Navidrome implements MusicService { } else { return navidrome.getArtistWithInfo(credentials, id).then((artist) => { if (artist.image.large) { - console.log(`fetching from ${artist.image.large}`); return axios .get(artist.image.large!, { headers: BROWSER_HEADERS, @@ -501,9 +500,6 @@ export class Navidrome implements MusicService { } }); } else if (artist.albums.length > 0) { - console.log( - `gettin cover art for artist album id = ${artist.albums[0]!.id}` - ); return navidrome .getCoverArt(credentials, artist.albums[0]!.id, size) .then((res) => ({ diff --git a/src/smapi.ts b/src/smapi.ts index 0f15682..b381ee6 100644 --- a/src/smapi.ts +++ b/src/smapi.ts @@ -234,6 +234,7 @@ const album = ( id: `album:${album.id}`, title: album.name, albumArtURI: defaultAlbumArtURI(webAddress, accessToken, album), + canPlay: true }); export const track = ( diff --git a/tests/smapi.test.ts b/tests/smapi.test.ts index 40973db..568736f 100644 --- a/tests/smapi.test.ts +++ b/tests/smapi.test.ts @@ -576,6 +576,7 @@ describe("api", () => { id: `album:${it.id}`, title: it.name, albumArtURI: defaultAlbumArtURI(rootUrl, accessToken, it), + canPlay: true })), index: 0, total: artistWithManyAlbums.albums.length, @@ -601,6 +602,7 @@ describe("api", () => { id: `album:${it.id}`, title: it.name, albumArtURI: defaultAlbumArtURI(rootUrl, accessToken, it), + canPlay: true })), index: 2, total: artistWithManyAlbums.albums.length, @@ -706,6 +708,7 @@ describe("api", () => { id: `album:${it.id}`, title: it.name, albumArtURI: defaultAlbumArtURI(rootUrl, accessToken, it), + canPlay: true })), index: 0, total: 6, @@ -732,6 +735,7 @@ describe("api", () => { id: `album:${it.id}`, title: it.name, albumArtURI: defaultAlbumArtURI(rootUrl, accessToken, it), + canPlay: true })), index: 2, total: 6,