66 383
contributi
mNessun oggetto della modifica |
mNessun oggetto della modifica |
||
Riga 199: | Riga 199: | ||
return p.RecurringList(PagesList, Series) | return p.RecurringList(PagesList, Series, 3) | ||
--return #Characters .. " - " .. #Characters .. " - " .. table.concat(PagesList, ", ") | --return #Characters .. " - " .. #Characters .. " - " .. table.concat(PagesList, ", ") | ||
else | else | ||
Riga 211: | Riga 211: | ||
-- @param Pages Table containing characters' pages names | -- @param Pages Table containing characters' pages names | ||
-- @param Series String with name of the Series | -- @param Series String with name of the Series | ||
-- @param MinOccurr Integer with minimum value of occurencies | |||
-- @return String Bullet list of characters and episodes | -- @return String Bullet list of characters and episodes | ||
function p.RecurringList(Pages, Series) | function p.RecurringList(Pages, Series, MinOccurr) | ||
local Results = {} | local Results = {} | ||
if MinOccurr == nil or MinOccur < 1 then | |||
MinOccurr = 1 | |||
end | |||
if type(Pages) == "table" then | if type(Pages) == "table" then | ||
Riga 227: | Riga 231: | ||
Episodes = mw.smw.ask('[[Serie::' .. Series .. ']][[Personaggio::' .. Page .. ']]|sort=Numero di produzione|order=asc') | Episodes = mw.smw.ask('[[Serie::' .. Series .. ']][[Personaggio::' .. Page .. ']]|sort=Numero di produzione|order=asc') | ||
if (Episodes ~= nil) and (#Episodes > | if (Episodes ~= nil) and (#Episodes > MinOccurr - 1) then | ||
--[=[ | --[=[ | ||
Episodes = mw.smw.getQueryResult('[[Serie::' .. Series .. ']][[Personaggio::' .. Page.fulltext .. ']]|sort=Numero di produzione|order=asc') | Episodes = mw.smw.getQueryResult('[[Serie::' .. Series .. ']][[Personaggio::' .. Page.fulltext .. ']]|sort=Numero di produzione|order=asc') |