Goals for today

  • Make each click of the next show button start playing another show
  • Show the show date and song name if possible
  • Make each click of the next song button play the next song from the same show (until all of them are played)

Right now the list of songs is saved in a static list that got created at server setup. There are only 50 songs and then the list of songs runs out. What I want it to do is have every song for three shows saved in three ArrayLists. When a show is skipped a random song in the next show is played. Then while the next song is playing another show takes the place.

Next song sticks to the same show and plays them in order until all of them are played. Then it grabs the next show.

Reach Goals

  • List out all of the songs that are in the show
  • Stop playing the song when another one is loaded. ONLY ONE AT A TIME!
  • Add ALL of the moe. shows to the database



The easiest implementation I can think of is to just have the user access the database each time a new show is needed. The next song should just play the next song in the list until it runs through them all. So I need a count of the songs in the show and the song_url’s.

I want to access my mysql database to remind myself what I’m working with. Do NOT include the port number. Password is your old school one 6.

mysql -h -u milesgwood -p

mysql -h -u milesgwood -p

use moe_db

The iframe I am using takes two extra pieces of information from the database. Archive example

<iframe src=”” width=”500″ height=”30″ frameborder=”0″ webkitallowfullscreen=”true” mozallowfullscreen=”true” allowfullscreen></iframe>

It’s the show url and the song name : show_url + / + name

I want to get a random show from the database. There are currently 859 shows with songs in the database. I want one.

SELECT column FROM table
SELECT show_id FROM songs  ORDER BY RAND()  LIMIT 1;

Get a random show ID. Then I use that ID to get the info about the show and the songs.

I will definitely need to keep track of the last played song in session.

Session object handling

Making Ajax action HTTP Session aware

Getting the show info.

SELECT * FROM shows WHERE id = 748;

SELECT * FROM shows WHERE id = ?;

Getting the songs for the show

SELECT * FROM songs WHERE show_id = 748;

Time for a redeploy

Here is the old URL –

I want to see if the new URL from elastic beanstalk is the same. I’m hoping it will be. I will setup a redirect on my WordPress if it isn’t the same URL. They are the same URL so I am safe to use it as is.