67 247
contributi
(Query results limit increased to 500) |
mNessun oggetto della modifica |
||
(5 versioni intermedie di uno stesso utente non sono mostrate) | |||
Riga 58: | Riga 58: | ||
function p.SeasonsQty(ShortName) | function p.SeasonsQty(ShortName) | ||
local QueryResult | local QueryResult | ||
local Max | local Max = 0 | ||
local PrefixText | local PrefixText | ||
Riga 72: | Riga 72: | ||
-- See https://github.com/SemanticMediaWiki/SemanticScribunto/blob/master/docs/mw.smw.ask.md#result | -- See https://github.com/SemanticMediaWiki/SemanticScribunto/blob/master/docs/mw.smw.ask.md#result | ||
-- for return value example | -- for return value example | ||
if QueryResult == nil or Max < 0 then | if QueryResult == nil or Max < 0 then | ||
return 0 | return 0 | ||
else | else | ||
Max = QueryResult[1]["Stagione"] | |||
return Max | return Max | ||
end | end | ||
Riga 233: | Riga 233: | ||
--Count = mw.smw.ask('[[Serie::' .. Series .. ']][[Personaggio::' .. Page.fulltext .. ']]|format=count') | --Count = mw.smw.ask('[[Serie::' .. Series .. ']][[Personaggio::' .. Page.fulltext .. ']]|format=count') | ||
--Episodes = mw.smw.ask('[[Serie::' .. Series .. ']][[Personaggio::' .. Page.fulltext .. ']]|sort=Numero di produzione|order=asc') | --Episodes = mw.smw.ask('[[Serie::' .. Series .. ']][[Personaggio::' .. Page.fulltext .. ']]|sort=Numero di produzione|order=asc') | ||
Episodes = mw.smw.ask('[[Serie::' .. Series .. ']][[Personaggio::' .. Page .. ']]|sort=Numero di produzione|order=asc') | Episodes = mw.smw.ask('[[Serie::' .. Series .. ']][[Personaggio::' .. Page .. ']]|limit=100|sort=Numero di produzione|order=asc') | ||
if (Episodes ~= nil) and (#Episodes > MinOccurr - 1) then | if (Episodes ~= nil) and (#Episodes > MinOccurr - 1) then |