anchor.diff:  	playing=0
   
   	var/loop_mode = JUKEMODE_SHUFFLE
  -	// /datum/song_info
  +
  +	// Server-side playlist IDs this jukebox can play.
  +	var/list/playlists=list() // ID = Label
  +
  +	// Playlist to load at startup.
  +	var/playlist_id=""
  +
   	var/list/playlist
   	var/current_song  = 0
   	var/autoplay      = 0
   	var/last_reload   = 0
  +
  +/obj/machinery/media/jukebox/bar
  +	playlist_id="bar"
  +	// Must be defined on your server.
  +	playlists=list(
  +		"bar"  = "Bar Mix",
  +		"jazz" = "Jazz",
  +		"rock" = "Rock",
  +		"lounge" = "Portishead - Dummy"
  +	)
   
   /obj/machinery/media/jukebox/attack_ai()
   	return
   
   /obj/machinery/media/jukebox/attack_paw()
   	return
  +
   /obj/machinery/media/jukebox/proc/check_reload()
   	return world.time > last_reload + JUKEBOX_RELOAD_COOLDOWN
  +
   /obj/machinery/media/jukebox/attack_hand(var/mob/user)
   	var/t = "<h1>Jukebox Interface</h1>"
   	t += "<b>Power:</b> <a href='?src=\ref[src];power=1'>[playing?"On":"Off"]</a><br />"
  
positive.code: 
  /obj/machinery/media/jukebox/process()
  	if(!playlist)
  		var/url="[config.media_base_url]/index.php"
  		testing("[src] - Updating playlist from [url]...")
  		var/response = world.Export(url)
  		playlist=list()
  		if(response)
  			var/json = file2text(response["CONTENT"])
  			var/json_reader/reader = new()
  			reader.tokens = reader.ScanJson(json)
  			reader.i = 1
  
negative.code: 		playing=!playing
  		update_music()
  
  	if (href_list["playlist"])
  		if(!check_reload())
  			usr << "\red You must wait 60 seconds between playlist reloads."
  			return
  		playlist_id=href_list["playlist"]
  		last_reload=world.time
  		playlist=null
  		current_song=0
  