fix(share): use album.link instead of song.link for albums

Odesli provides different domains for different content types:
- song.link for individual tracks
- album.link for albums

Updated album share functions and menu label accordingly.
This commit is contained in:
vicrodh committed 2026-01-24 12:46:57 -06:00
1 parent 872ebac8b6
commit bff1730aa5
2 files changed
+8 -8

No files matched your search

+1 -1
View File
@@ -308,7 +308,7 @@
{#if onShareSonglink}
<button class="menu-item" onclick={() => handleAction(onShareSonglink)}>
<Link size={14} />
<span>Song.link</span>
<span>Album.link</span>
</button>
{/if}
</div>
+7 -7
View File
@@ -663,9 +663,9 @@
function shareAlbumSonglinkById(albumId: string) {
const qobuzUrl = `https://play.qobuz.com/album/${albumId}`;
const songlinkUrl = `https://song.link/${encodeURIComponent(qobuzUrl)}`;
writeText(songlinkUrl);
showToast('Song.link copied to clipboard', 'success');
const albumLinkUrl = `https://album.link/${encodeURIComponent(qobuzUrl)}`;
writeText(albumLinkUrl);
showToast('Album.link copied to clipboard', 'success');
}
async function downloadAlbumById(albumId: string) {
@@ -1217,13 +1217,13 @@
showToast('Album link copied to clipboard', 'success');
}
// Share album via song.link
// Share album via album.link
async function shareAlbumSonglink() {
if (!selectedAlbum?.id) return;
const qobuzUrl = `https://play.qobuz.com/album/${selectedAlbum.id}`;
const songlinkUrl = `https://song.link/${encodeURIComponent(qobuzUrl)}`;
writeText(songlinkUrl);
showToast('Song.link copied to clipboard', 'success');
const albumLinkUrl = `https://album.link/${encodeURIComponent(qobuzUrl)}`;
writeText(albumLinkUrl);
showToast('Album.link copied to clipboard', 'success');
}
function handleAlbumTrackPlayNext(track: Track) {