diff options
Diffstat (limited to 'src/qlistener.lua')
-rw-r--r-- | src/qlistener.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qlistener.lua b/src/qlistener.lua index 5e31890..ef3f6bb 100644 --- a/src/qlistener.lua +++ b/src/qlistener.lua @@ -35,7 +35,7 @@ function init(conffile) cnf = conf.load(conffile) end -function handle_now(timestamp, nowcart, nowlen) +function handle_now(timestamp, output, nowcart, nowlen) local results, err = rddb:getCartInfo(nowcart) if results == nil then io.stderr:write("ERROR: can't fetch cart info: " .. err .. "\n") @@ -46,7 +46,7 @@ function handle_now(timestamp, nowcart, nowlen) io.stderr:write("ERROR: can't fetch show/pool name: " .. carttype .. "\n") return true else - local ret, err = playlog:insertNow(timestamp, nowcart, nowlen, showtitle, results.TITLE, results.ARTIST, results.ALBUM, carttype) + local ret, err = playlog:insertNow(timestamp, nowcart, nowlen, showtitle, results.TITLE, results.ARTIST, results.ALBUM, carttype, output) if ret == nil then io.stderr:write("ERROR: can't insert cart info: " .. err .. "\n") else @@ -68,7 +68,7 @@ function handle_message(msg, q) if last_carts[output] == nil then last_carts[output] = 0 end if last_carts[output] ~= nowcart and nowlen > 0 then last_carts[output] = nowcart - local ret = handle_now(timestamp, nowcart, nowlen) + local ret = handle_now(timestamp, output, nowcart, nowlen) if ret == nil then io.stderr:write("INFO: trying to push last message back onto the queue - before exiting\n") local result, err = mq.send(q, timestamp .. " " .. output .. " " .. nowcart .. " " .. nowlen .. " " .. nextcart .. " " .. nextlen, 0) |