Permalink
Browse files

Merge branch 'master' of git://github.com/comotion/hangover

  • Loading branch information...
2 parents efd3e3a + 1e760dc commit de8ef044262e3e93170a42cbaef2726b6508b7ea why committed Oct 2, 2012
Showing with 5 additions and 2 deletions.
  1. +4 −2 web/hangover.lua
  2. +1 −0 web/lib/getracks.lua
View
@@ -12,6 +12,7 @@ local tracks = require "lib/tracks"
local u = require "lib/util"
local io = require "io"
local md5 = require "md5"
+local meta = require "metadata"
require "config"
local user = "badface" -- XXX: basic auth/user db
@@ -89,9 +90,10 @@ function post_db(web,...)
return json.encode{{status="fail", reason=err}}
end
print("'"..destname.. "'".." " .. os.difftime(os.time(), t.submitted).."s")
- -- TODO attempt id3 extraction / file metadata
+ -- id3 extraction / file metadata -- TODO: expand tags into t
+ t.tag = meta.gettags(t.path)
-- add to database, tags and all
- id = tracks:add(t)
+ id = tracks:add(t, tag)
-- redirect to tag editor (what of multiple files?)
return json.encode{tracks=t,id=id}
elseif id then -- just editing the node
View
@@ -1,3 +1,4 @@
+#!/usr/bin/env lua
module("getracks",package.seeall)
--id3 = require "lamt.mpeg" -- ffi doesnt work
--id3 = require "lib.meta.id321" -- id3v2 cant get all tags

0 comments on commit de8ef04

Please sign in to comment.