Module:IdentifySeries

-- local p = {} local seriesData = mw.loadData('Module:IdentifySeries/data') local numData = mw.loadData('Module:Number/data') function p.getSeries(frame) local episode= frame.args[1] local seriesName={} if seriesData[episode] then seriesName=seriesData[episode][1] else seriesName="Arrowverse Wiki" end return seriesName end

function p.EpisodeHover(frame) local episode=frame.args[1] local color=frame.args[2] local hoverInfo={} if seriesData[episode] then local number=seriesData[episode][3] local show=seriesData[episode][1] local extra=")"       	if seriesData[episode][4] > numData[show][1]        		then if episode=="Final Girl"        			then extra="; unproduced)" else extra="; upcoming)"       		end        	end            if number < 10                then number="0"                    ..seriesData[episode][3]            end            hoverInfo="(" ..seriesData[episode][1] .." "           ..seriesData[episode][2] .."x" ..number ..extra else hoverInfo="(Arrowverse Wiki)" end local length= mw.ustring.len(episode) local par={} if mw.ustring.find(episode,'(',1,true)==nil       then par=length        else par=mw.ustring.find(episode,'(',1,true)-2 end local title=mw.ustring.sub(episode,1,par) local fullForm="" if hoverInfo == "(Arrowverse Wiki)" then if episode=="TBA" then fullForm=fullForm else fullForm=fullForm ..""           	..episode            	.."" end end return frame:preprocess(fullForm) end return p