- Support multiple music providers

- feat: Doubleclick on track in Table view to get technical information about it
This commit is contained in:
Kamil
2024-12-03 12:48:27 +00:00
parent 883294d74e
commit 87791cf21d
12 changed files with 306 additions and 109 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

@@ -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);