diff --git a/static/images/placeholder.png b/static/images/placeholder.png new file mode 100644 index 0000000..1251616 Binary files /dev/null and b/static/images/placeholder.png differ diff --git a/static/js/preview.js b/static/js/preview.js index 395be85..558c534 100644 --- a/static/js/preview.js +++ b/static/js/preview.js @@ -5,14 +5,14 @@ var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) { }) // Function to open the search modal and trigger the search automatically -function openSearchModal(trackTitle, spotify_id) { +function openSearchModal(trackTitle, provider_track_id) { const modal = new bootstrap.Modal(document.getElementById('searchModal')); const searchQueryInput = document.getElementById('search-query'); - const spotifyIdInput = document.getElementById('spotify-id'); + const providerTrackIdInput = document.getElementById('provider-track-id'); // Pre-fill the input fields searchQueryInput.value = trackTitle; - spotifyIdInput.value = spotify_id; + providerTrackIdInput.value = provider_track_id; // Show the modal modal.show(); @@ -85,10 +85,10 @@ function playJellyfinTrack(button, jellyfinId) { .catch(error => console.error('Error fetching Jellyfin stream URL:', error)); } -function handleJellyfinClick(event, jellyfinId, trackTitle, spotifyId) { +function handleJellyfinClick(event, jellyfinId, trackTitle, providerTrackId) { if (event.ctrlKey) { // CTRL key is pressed, open the search modal - openSearchModal(trackTitle, spotifyId); + openSearchModal(trackTitle, providerTrackId); } else { // CTRL key is not pressed, play the track playJellyfinTrack(event.target, jellyfinId); diff --git a/templates/base.html b/templates/base.html index 6203a42..93bb6b7 100644 --- a/templates/base.html +++ b/templates/base.html @@ -34,12 +34,22 @@