plugins/data: remove logging and fix query
This commit is contained in:
parent
e5b66d27d8
commit
d961efa925
@ -7,7 +7,6 @@ local function init()
|
|||||||
local filepath
|
local filepath
|
||||||
local dbver
|
local dbver
|
||||||
local fh
|
local fh
|
||||||
local slaxml = require("xml")
|
|
||||||
|
|
||||||
for path in mame_manager.ui.options.entries.historypath:value():gmatch("([^;]+)") do
|
for path in mame_manager.ui.options.entries.historypath:value():gmatch("([^;]+)") do
|
||||||
filepath = emu.subst_env(path) .. "/" .. file
|
filepath = emu.subst_env(path) .. "/" .. file
|
||||||
@ -59,10 +58,8 @@ local function init()
|
|||||||
|
|
||||||
for line in fh:lines() do
|
for line in fh:lines() do
|
||||||
local match = line:match("<history([^>]*)>")
|
local match = line:match("<history([^>]*)>")
|
||||||
print(line, match)
|
|
||||||
if match then
|
if match then
|
||||||
match = match:match("version=\"([^\"]*)\"")
|
match = match:match("version=\"([^\"]*)\"")
|
||||||
print(match)
|
|
||||||
if match then
|
if match then
|
||||||
ver = match
|
ver = match
|
||||||
break
|
break
|
||||||
@ -101,6 +98,7 @@ local function init()
|
|||||||
local lasttag
|
local lasttag
|
||||||
local entry = {}
|
local entry = {}
|
||||||
local rowid
|
local rowid
|
||||||
|
local slaxml = require("xml")
|
||||||
|
|
||||||
local parser = slaxml:parser{
|
local parser = slaxml:parser{
|
||||||
startElement = function(name)
|
startElement = function(name)
|
||||||
@ -161,7 +159,7 @@ function dat.check(set, softlist)
|
|||||||
stmt:bind_values(set, softlist)
|
stmt:bind_values(set, softlist)
|
||||||
else
|
else
|
||||||
stmt = db.prepare("SELECT f.data FROM \"" .. file .. "_idx\" AS fi, \"" .. file .. [["
|
stmt = db.prepare("SELECT f.data FROM \"" .. file .. "_idx\" AS fi, \"" .. file .. [["
|
||||||
AS f WHERE fi.name = ? AND fi.list = NULL AND f.rowid = fi.data]])
|
AS f WHERE fi.name = ? AND fi.list ISNULL AND f.rowid = fi.data]])
|
||||||
stmt:bind_values(set)
|
stmt:bind_values(set)
|
||||||
end
|
end
|
||||||
if stmt:step() == db.ROW then
|
if stmt:step() == db.ROW then
|
||||||
|
Loading…
Reference in New Issue
Block a user