remove qobuz bio as i can't test it
This commit is contained in:
parent
acc9d8b5cd
commit
242541a7bb
2 changed files with 3 additions and 17 deletions
|
|
@ -78,6 +78,8 @@ export class MusicAPI {
|
||||||
|
|
||||||
async getArtistBiography(id, provider = null) {
|
async getArtistBiography(id, provider = null) {
|
||||||
const p = provider || this.getProviderFromId(id) || this.getCurrentProvider();
|
const p = provider || this.getProviderFromId(id) || this.getCurrentProvider();
|
||||||
|
if (p !== 'tidal') return null; // Biography only supported for Tidal
|
||||||
|
|
||||||
const api = this.getAPI(p);
|
const api = this.getAPI(p);
|
||||||
const cleanId = this.stripProviderPrefix(id);
|
const cleanId = this.stripProviderPrefix(id);
|
||||||
if (typeof api.getArtistBiography === 'function') {
|
if (typeof api.getArtistBiography === 'function') {
|
||||||
|
|
|
||||||
|
|
@ -179,29 +179,13 @@ export class QobuzAPI {
|
||||||
tracks = artistData.data.top_tracks.map((track) => this.transformTrack(track));
|
tracks = artistData.data.top_tracks.map((track) => this.transformTrack(track));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get biography
|
return { ...artist, albums, eps, tracks };
|
||||||
const biography = artistData.data.biography || artistInfo.biography || null;
|
|
||||||
|
|
||||||
return { ...artist, albums, eps, tracks, biography };
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Qobuz getArtist failed:', error);
|
console.error('Qobuz getArtist failed:', error);
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Qobuz biography - usually part of getArtist, but adding for API consistency
|
|
||||||
async getArtistBiography(id) {
|
|
||||||
try {
|
|
||||||
const data = await this.getArtist(id);
|
|
||||||
return {
|
|
||||||
text: data.biography,
|
|
||||||
source: 'Qobuz',
|
|
||||||
};
|
|
||||||
} catch (e) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Transform Qobuz track to Tidal-like format
|
// Transform Qobuz track to Tidal-like format
|
||||||
transformTrack(track, albumData = null) {
|
transformTrack(track, albumData = null) {
|
||||||
// Qobuz uses 'performer' for the main artist, not 'artist'
|
// Qobuz uses 'performer' for the main artist, not 'artist'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue