Merge pull request #439 from Mrigakshi-RC/fix/share-playlist

fix(library): share playlist with the correct url
This commit is contained in:
Samidy 2026-03-27 21:51:57 +03:00 committed by GitHub
commit b1b6366528
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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(() => {