I’m working on a homeserver project, a page for users of my Plex media server to vote on bad movies to be cleared from my library.
I’ve got the data stored in a mysql db, which I pull and store in an array then create a unique UDCard for each movie with the details,etc. I’ve put a button on each card to vote, at which point i want it to take and record the vote and update the movie entry in the mysql db with a new vote number.
I’ve also got a button that i want to redirect and open a search for the trailer on youtube, incase someone needs a refresher.
The problem i’m running into is that while the cards are all unique to the movie, the buttons don’t have data associated with the card they are nested in. If know i can use get-udelement in design and pull up the info of any of the cards i want, but is there a method within my code to make each button tied to the data of the card it is a part of? If someone clicks vote, it should take the unique ID of the movie, and then invoke a query to update the sql table with a new vote count. If the button to search for the trailer is hit, it should open up to a search of that movie trailer (instead it comes up to the same search results for the last video in the array).