Permalink
Browse files

adding Download button for now playlist entries. requires some server…

… setup.
  • Loading branch information...
1 parent 6505c94 commit a0985496a3afa274c9c0d1a41207eb95b99dc12f @thejoshwolfe thejoshwolfe committed Feb 5, 2012
Showing with 9 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +7 −0 groovebasind
  3. +1 −0 views/playlist.handlebars
View
@@ -2,3 +2,4 @@ public/app.js
public/app.css
public/test.js
node_modules/
+public/library
View
@@ -1,5 +1,6 @@
#!/usr/bin/env coffee
+fs = require 'fs'
http = require 'http'
net = require 'net'
socketio = require 'socket.io'
@@ -22,6 +23,12 @@ nconf
port: 6600
conf: "/etc/mpd.conf"
+# check for library link
+public_dir = "./public"
+library_link = public_dir + "/library"
+fs.readdir library_link, (err, files) ->
+ err? and console.log "ERROR: #{library_link} not linked to media library"
+
# static server
fileServer = new (static.Server) './public'
app = http.createServer((request, response) ->
@@ -19,6 +19,7 @@
<td>{{track.album.name}}</td>
<td class="time">{{time track.time}}</td>
<td>
+ <a href="library/{{track.file}}" target="_blank">Download</a>
<a href="#" class="remove" data-id="{{id}}">Remove</a>
</td>
</tr>

0 comments on commit a098549

Please sign in to comment.