fix(share): implement proper album.link resolution via iTunes lookup
- Add UPC field to Album models (Rust and TypeScript)
- Enhance share_album_songlink command to use iTunes lookup:
- First tries UPC lookup via iTunes API
- Falls back to Odesli API with UPC
- Then tries album title/artist search on iTunes
- Generates direct album.link/i/{id} URLs like tracks do
- Update frontend to use the backend command instead of
generating non-functional URL-based links
This mirrors the track sharing approach that uses ISRC/iTunes
lookup to generate working song.link URLs.
This commit is contained in:
1 parent
bff1730aa5
commit
270465e822
5 files changed
+158
-22
No files matched your search
@@ -343,7 +343,8 @@ export function convertQobuzAlbum(album: QobuzAlbum): AlbumDetail {
|
||||
albumId: album.id,
|
||||
artistId: track.performer?.id ?? album.artist?.id,
|
||||
isrc: track.isrc
|
||||
})) || []
|
||||
})) || [],
|
||||
upc: album.upc
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ export interface QobuzAlbum {
|
||||
maximum_bit_depth?: number;
|
||||
maximum_sampling_rate?: number;
|
||||
tracks?: { items: QobuzTrack[] };
|
||||
upc?: string;
|
||||
}
|
||||
|
||||
export interface QobuzPlaylist {
|
||||
@@ -113,6 +114,7 @@ export interface AlbumDetail {
|
||||
trackCount: number;
|
||||
duration: string;
|
||||
tracks: Track[];
|
||||
upc?: string; // Universal Product Code for album.link sharing
|
||||
}
|
||||
|
||||
export interface ArtistDetail {
|
||||
|
||||
Reference in new issue
Block a user