Skip to content

Commit

Permalink
db name change and put input
Browse files Browse the repository at this point in the history
  • Loading branch information
comotion committed Nov 19, 2012
1 parent 418980a commit 3474e98
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "web/lib/lamt"] [submodule "web/lib/lamt"]
path = web/lib/lamt path = web/lib/lamt
url = git://github.com/comotion/lamt.git url = git://github.com/comotion/lamt.git
[submodule "web/lib/tokyotyrant"]
path = web/lib/tokyotyrant
url = https://github.com/daurnimator/lua-tokyotyrant.git
8 changes: 8 additions & 0 deletions TODO
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ What to do and how:
+ empty searches?! :: + empty searches?! ::
+ getracks 01.fuck yuo + getracks 01.fuck yuo
+ empty upload fucks up + empty upload fucks up
+ get nonexistant track fucks up

wishlist:
- edit page
- error messages
- (add to .. ) playlist builder
- create program dialog (with sched picker)
- delete track/playlist track/playlist/


- get_next: - get_next:
knows about silences, metadata, can queue songs knows about silences, metadata, can queue songs
Expand Down
2 changes: 2 additions & 0 deletions web/config.lua
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ tracks_path = "/tmp/mu"
-- must be on same device as tracks_path, or error: "invalid cross-device link" -- must be on same device as tracks_path, or error: "invalid cross-device link"
temp_dir = "/tmp" temp_dir = "/tmp"


-- database host, port
--host,port = ('localhost',1978)
4 changes: 2 additions & 2 deletions web/hangover.lua
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ function put_db(web,...)
local id = ... local id = ...
local input = web.input.post_data local input = web.input.post_data
u.out(input) u.out(input)
if input then if not input then
input = json.decode(input) return json.encode{{result=nil, error="nothing to put"}}
end end
return tracks:update(id, input) return tracks:update(id, input)
end end
Expand Down
2 changes: 1 addition & 1 deletion web/lib/tokyo.lua
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local u = require "lib/util"
module("tokyo", package.seeall) module("tokyo", package.seeall)


function tokyo:init(name) function tokyo:init(name)
local file = name .. ".tch" local file = name .. ".tct"
-- fix this stupidity. if you spell the query type wrong, -- fix this stupidity. if you spell the query type wrong,
-- you get no warnings, nothing. -- you get no warnings, nothing.


Expand Down
1 change: 1 addition & 0 deletions web/lib/tokyotyrant
Submodule tokyotyrant added at 3841dd
3 changes: 2 additions & 1 deletion web/lib/tracks.lua
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ function tracks.filter(result, fields, limit, skip)
end end
return res return res
end end
u.out("fapfapfap", tracks:dump()) u.out("fapfapfap")
u.out(tracks:dump())
return tracks return tracks


0 comments on commit 3474e98

Please sign in to comment.