fix(library): share playlist with the correct url

This commit is contained in:
Mrigakshi Roy Choudhury 2026-03-28 00:13:36 +05:30
parent 589c1a3e40
commit 65d0eadb71

View file

@ -1641,7 +1641,8 @@ export async function handleTrackAction(
// Use stored href from card if available, otherwise construct URL
const contextMenu = document.getElementById('context-menu');
const storedHref = contextMenu?._contextHref;
const url = getShareUrl(storedHref ? storedHref : `/${type}/${item.id || item.uuid}`);
const typeForUrl= type === 'user-playlist' ? 'userplaylist' : type;
const url = getShareUrl(storedHref ? storedHref : `/${typeForUrl}/${item.id || item.uuid}`);
trackCopyLink(type, item.id || item.uuid);
navigator.clipboard.writeText(url).then(() => {