diff --git a/static/js/preview.js b/static/js/preview.js index 4affc87..395be85 100644 --- a/static/js/preview.js +++ b/static/js/preview.js @@ -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); + } } \ No newline at end of file diff --git a/templates/partials/_track_table.html b/templates/partials/_track_table.html index 5d9baac..eec4663 100644 --- a/templates/partials/_track_table.html +++ b/templates/partials/_track_table.html @@ -47,13 +47,14 @@ {% endif %}