Commit 28196ce7 authored by mattl's avatar mattl

Download button

parent 1c74498b
......@@ -24,6 +24,7 @@
*/
var audio;
var dlbutton;
var scrobbled, now_playing, tracktoptags;
var artist, album, track, trackpage, radio_key, ws_key, api_key, station;
var playlist = [], current_song = 0;
......@@ -44,6 +45,7 @@ var base_url = base_url || "";
*/
function playerInit(list, ws, rk, stationurl, gnufm_key) {
audio = document.getElementById("audio");
dlbutton = document.getElementById("dlbutton");
if (!list) {
// We're playing a stream instead of a playlist
streaming = true;
......@@ -452,6 +454,7 @@ function loadSong(song) {
scrobbled = false;
now_playing = false;
audio.src = url;
dlbutton.href = url;
audio.load();
if(streaming && current_song > playlist.length - 3) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment