allow manual track relinking

fixes #13
This commit is contained in:
Kamil
2024-11-26 15:23:08 +00:00
parent 0ca91b7d7b
commit a436a0ad91
2 changed files with 13 additions and 2 deletions

View File

@@ -83,4 +83,14 @@ function playJellyfinTrack(button, jellyfinId) {
};
})
.catch(error => console.error('Error fetching Jellyfin stream URL:', error));
}
function handleJellyfinClick(event, jellyfinId, trackTitle, spotifyId) {
if (event.ctrlKey) {
// CTRL key is pressed, open the search modal
openSearchModal(trackTitle, spotifyId);
} else {
// CTRL key is not pressed, play the track
playJellyfinTrack(event.target, jellyfinId);
}
}