require('strict')
local infobox = require('Module:Infobox').infobox
local p =
local function getProperty(entity, property, value) if entity and entity.claims then local claims = entity.claims[property] if claims and claims[1] then if value
local function getQualifier(qualifiers, property, value) local claims = qualifiers[property] if claims and claims[1] then if value
function p.test(frame) local args = frame.args local entity = mw.wikibase.getEntity(args.qid) local data = local recording if not data.data10 or not data.data21 then local artist, qualifiers = getProperty(entity, 'P175') if artist then data.data10 = data.data10 or mw.wikibase.getLabel(artist) end local subject_of = getQualifier(qualifiers, 'P805') if subject_of then recording = mw.wikibase.getEntity(subject_of) local isrc = getProperty(recording, 'P1243', 'string') data.data21 = data.data21 or isrc end end return infobox(data)end
return p