Module:Album image: Difference between revisions
MusikAnimal (talk | contribs) No edit summary |
MusikAnimal (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
function p. | function p._main(title) | ||
local cargo = mw.ext.cargo | local cargo = mw.ext.cargo | ||
local results = cargo.query( | local results = cargo.query( | ||
Line 15: | Line 15: | ||
end | end | ||
function p. | function p.main(frame) | ||
return p._albumImage(frame.args[1]) | return p._albumImage(frame.args[1]) | ||
end | end | ||
return p | return p |
Revision as of 03:03, 11 June 2020
Documentation for this module may be created at Module:Album image/doc
local p = {}
function p._main(title)
local cargo = mw.ext.cargo
local results = cargo.query(
'albums',
'cover',
{ where = 'name = "' .. title .. '"' }
)
for r = 1, #results do
local result = results[r]
return result['cover']
end
end
function p.main(frame)
return p._albumImage(frame.args[1])
end
return p