diff --git a/js/events.js b/js/events.js index dcd9b2f..aebf437 100644 --- a/js/events.js +++ b/js/events.js @@ -1310,7 +1310,7 @@ 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 : `/track/${item.id || item.uuid}`); + const url = getShareUrl(storedHref ? storedHref : `/${type}/${item.id || item.uuid}`); trackCopyLink(type, item.id || item.uuid); navigator.clipboard.writeText(url).then(() => { @@ -1322,7 +1322,7 @@ export async function handleTrackAction( const storedHref = contextMenu?._contextHref; const url = storedHref ? `${window.location.origin}${storedHref}` - : `${window.location.origin}/track/${item.id || item.uuid}`; + : `${window.location.origin}/${type}/${item.id || item.uuid}`; trackOpenInNewTab(type, item.id || item.uuid); window.open(url, '_blank'); @@ -1350,7 +1350,7 @@ export async function handleTrackAction(
Unreleased Track
Artist: ${escapeHtml(Array.isArray(item.artists) ? item.artists.map((a) => a.name || a).join(', ') : item.artists)}
` : ''} ${item.trackerInfo.artist ? `Tracked Artist: ${escapeHtml(item.trackerInfo.artist)}
` : ''} @@ -1365,7 +1365,7 @@ export async function handleTrackAction( ${item.trackerInfo.leakedDate ? `Leak Date: ${escapeHtml(new Date(item.trackerInfo.leakedDate).toLocaleDateString())}
` : ''} ${item.trackerInfo.recordingDate ? `Recording Date: ${escapeHtml(new Date(item.trackerInfo.recordingDate).toLocaleDateString())}
` : ''}Track ID: ${escapeHtml(item.id)}
` : ''} @@ -1429,7 +1429,7 @@ export async function handleTrackAction( ${item.explicit ? `Explicit: Yes
` : ''}Quality: ${escapeHtml(quality)} ${bitrate ? `(${escapeHtml(bitrate)})` : ''}
- + ${ item.credits && item.credits.length > 0 ? ` @@ -1442,7 +1442,7 @@ export async function handleTrackAction( ` : '' } - + ${ item.composers && item.composers.length > 0 ? ` @@ -1450,7 +1450,7 @@ export async function handleTrackAction( ` : '' } - + ${ item.lyrics?.text ? ` @@ -1460,7 +1460,7 @@ export async function handleTrackAction( ` : '' } - + ${item.id ? `Track ID: ${escapeHtml(item.id)}
` : ''} ${item.album?.id ? `Album ID: ${escapeHtml(item.album.id)}
` : ''}