diff --git a/client/src/components/windows/manage_links/BatchLinkDialog.tsx b/client/src/components/windows/manage_links/BatchLinkDialog.tsx index aea23b3..d00c15c 100644 --- a/client/src/components/windows/manage_links/BatchLinkDialog.tsx +++ b/client/src/components/windows/manage_links/BatchLinkDialog.tsx @@ -172,10 +172,10 @@ async function doLinking( } let queryFuncs: any = { [ItemType.Song]: (s: any) => `${s.title}` + - `${s.artists && s.artists.length > 0 && ` ${s.artists[0].name}`}` + - `${s.albums && s.albums.length > 0 && ` ${s.albums[0].name}`}`, + `${s.artists && s.artists.length > 0 && ` ${s.artists[0].name}` || ''}` + + `${s.albums && s.albums.length > 0 && ` ${s.albums[0].name}` || ''}`, [ItemType.Album]: (s: any) => `${s.name}` + - `${s.artists && s.artists.length > 0 && ` ${s.artists[0].name}`}`, + `${s.artists && s.artists.length > 0 && ` ${s.artists[0].name}` || ''}`, [ItemType.Artist]: (s: any) => `${s.name}`, } let modifyFuncs: any = { diff --git a/client/src/lib/integration/spotify/SpotifyClientCreds.tsx b/client/src/lib/integration/spotify/SpotifyClientCreds.tsx index 62d9e13..df2a05b 100644 --- a/client/src/lib/integration/spotify/SpotifyClientCreds.tsx +++ b/client/src/lib/integration/spotify/SpotifyClientCreds.tsx @@ -47,8 +47,12 @@ export default class SpotifyClientCreds extends Integration { async searchSong(query: string, limit: number): Promise { return this.search(query, SearchType.Song, limit); } - async searchAlbum(query: string, limit: number): Promise { return []; } - async searchArtist(query: string, limit: number): Promise { return []; } + async searchAlbum(query: string, limit: number): Promise { + return this.search(query, SearchType.Album, limit); + } + async searchArtist(query: string, limit: number): Promise { + return this.search(query, SearchType.Artist, limit); + } async search(query: string, type: SearchType, limit: number): Promise {