Modulo:Fumetto e animazione/sandbox: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
correggo
m semplifico
Riga 47:
end
end
end
 
-- Converte la lettera iniziale di una stringa in minuscola
local function lcfirst(str)
return str:gsub('^%u', string.lower)
end
 
Riga 130 ⟶ 125:
-- Cerca il nome o l'alias del medium nella configurazione
function Media:_getValue(key_tipo, key_sottotipo)
local ret =if cfg[key_sottotipo][self.tipo] andthen
return cfg[key_sottotipo][self.tipo][self.sottotipo] or
else
return cfg[key_tipo][self.tipo]
return ret and lcfirst(ret) or nil
end
end
 
Riga 176 ⟶ 172:
:_addCategoriesBy('paese', 'fp', self._categorizeTVSeriesByCountry)
elseif self.media.name == "film d'animazione direct-to-video" then
self:_addCategoriesBy('paese', 'mp', self._categorizeDTVFilmByCountry)
self
:_addCategory(self.media.name)
:_addCategoriesBy('paese', 'mp', self._categorizeDTVFilmByCountry)
elseif self.media.name == "webserie d'animazione" then
self:_addCategoriesBy('paese', 'fp', self._categorizeWebseriesByCountry)
Riga 231 ⟶ 225:
 
-- categorizzazione per tipo delle opere non suddivise per anno
if self.media:inArray('film direct-to-video', 'manhua', 'manhwa', 'ONA', 'webserie') then
self:_addCategory(self.media.name)
-- categorizzazione delle opere suddivise per anno
elseif self.year and self.media.sottotipo ~= 'film direct-to-video' then
local media = self.media.sottotipo ~= 'serie TV' and
self.media.alias or self.media.name