Help with adding if song is in a playlist

Raspberry Pi related support

Help with adding if song is in a playlist

Postby westrock2000 » 27 Jul 2018, 20:07

I'm trying to make it so that if a song is in a playlist that it shows up in the browser section.

I found the spots in the javascript file that creates the webpage, but I'm unsure of is how to inject this text as needed. I only have Perl programming experience, so I am not well versed on JS or PHP, but the concepts are there.

My understanding is that JS is run locally on the client, so the runeui.js wouldn't be able to directly check if the song is part of the playlist file. But I'm guessing that it CAN use AJAX of some kind to talk back to the server to get a variable. Like the inputArr.Album is probably a variable being populated server side? Is this a variable or a function? How can I add another function that can go read /var/lib/mpd/playlists and return either a value or a blank (that way the javascript can write the same thing for everyline, but it will print "nothing" for most songs).

I'm not asking for someone to code it for me, I just need some pointers on how these things interact.

Image

Image
westrock2000
 
Posts: 23
Joined: 26 Mar 2017, 01:19

support RuneAudio Donate with PayPal

Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 2 guests