summaryrefslogtreecommitdiff
path: root/nopsyncd/qlistener.lua
diff options
context:
space:
mode:
Diffstat (limited to 'nopsyncd/qlistener.lua')
-rwxr-xr-xnopsyncd/qlistener.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/nopsyncd/qlistener.lua b/nopsyncd/qlistener.lua
index 1e02df2..753902d 100755
--- a/nopsyncd/qlistener.lua
+++ b/nopsyncd/qlistener.lua
@@ -23,7 +23,7 @@ local queue_name = "/rhnop"
local last_cart = nil
mq = require "luamq"
-tempstorage = require "tempstorage"
+playlog = require "playlog"
rddb = require "rddb"
function handle_now(timestamp, nowcart, nowlen)
@@ -32,7 +32,7 @@ function handle_now(timestamp, nowcart, nowlen)
io.stderr:write("can't fetch cart info: " .. err .. "\n")
else
-- print(timestamp .. " Info: '" .. results.TITLE .. "' von '" .. results.ARTIST .. "' aus '" .. results.ALBUM .. "'")
- local ret, err = tempstorage:insertMusic(timestamp, nowcart, nowlen, results.TITLE, results.ARTIST, results.ALBUM)
+ local ret, err = playlog:insertMusic(timestamp, nowcart, nowlen, results.TITLE, results.ARTIST, results.ALBUM)
if ret == nil then
io.stderr:write("can't insert music info: " .. err .. "\n")
else
@@ -62,17 +62,17 @@ function main_loop()
os.exit(1)
end
- local ret, err = tempstorage:init()
+ local ret, err = playlog:init()
if ret == nil then
- io.stderr:write("creation of tempstorage failed: " .. err .. "\n")
+ io.stderr:write("creation of playlog failed: " .. err .. "\n")
os.exit(1)
end
- last_cart = assert(tempstorage:getLastCart())
+ last_cart = assert(playlog:getLastCart())
local ret, err = rddb:init()
if ret == nil then
io.stderr:write("opening rivendell db failed: " .. err .. "\n")
- tempstorage:close()
+ playlog:close()
os.exit(1)
end
@@ -81,7 +81,7 @@ function main_loop()
if msg == nil then
io.stderr:write("recv error: " .. prio .. "\n")
rddb:close()
- tempstorage:close()
+ playlog:close()
os.exit(2)
end
handle_message(msg)