Cache album pics to mongo & listen url & check if track in db

This commit is contained in:
magnolia-fan
2011-04-07 08:02:49 +04:00
parent 3c96c151bd
commit 63136f8b67
14 changed files with 96 additions and 28 deletions
+11
View File
@@ -0,0 +1,11 @@
class TrackController < ApplicationController
def listen
@track = TrackData.where(id: params[:id])
unless @track.empty?
out = {:status => 'ok', :data => @track.first.files.first[1]}
else
out = {:status => 'no_such_track'}
end
render :json => out
end
end