 "use strict"
 
 async = require 'async'
+ffmpeg = require 'fluent-ffmpeg'
 fs = require 'fs'
 mime = require 'mime'
 mmd = require 'musicmetadata'

require('zappa') port, ->
  @get '/res/:id': ->
    db.hget @params.id, 'path', (err, path) =>
      @response.sendfile path

          media.genre = data.genre if data.genre?
          media.track = data.track if data.track?
          media.date = data.year if data.year?
          media.contenttype = 'audio/mpeg'
          fs.stat file, (err, stats) ->
            media.filesize = stats?.size or 0
            cb null, media
