<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://the-democratika.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AInfobox_television_season_name</id>
	<title>Module:Infobox television season name - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://the-democratika.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AInfobox_television_season_name"/>
	<link rel="alternate" type="text/html" href="https://the-democratika.com/wiki/index.php?title=Module:Infobox_television_season_name&amp;action=history"/>
	<updated>2026-04-04T23:02:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://the-democratika.com/wiki/index.php?title=Module:Infobox_television_season_name&amp;diff=8917&amp;oldid=prev</id>
		<title>&gt;Gonnym: fix for double digit seasons</title>
		<link rel="alternate" type="text/html" href="https://the-democratika.com/wiki/index.php?title=Module:Infobox_television_season_name&amp;diff=8917&amp;oldid=prev"/>
		<updated>2024-04-22T16:34:27Z</updated>

		<summary type="html">&lt;p&gt;fix for double digit seasons&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require(&amp;#039;strict&amp;#039;)&lt;br /&gt;
local match = require(&amp;quot;Module:String&amp;quot;)._match&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
--- Returns a formatted link to the list of episodes article.&lt;br /&gt;
--- @param listOfEpisodesArticle string&lt;br /&gt;
--- @return string&lt;br /&gt;
local function getListOfEpisodesLink(listOfEpisodesArticle)&lt;br /&gt;
	local listOfEpisodesPage = mw.title.new(listOfEpisodesArticle, 0)&lt;br /&gt;
	if listOfEpisodesPage and listOfEpisodesPage.exists and listOfEpisodesPage.redirectTarget ~= mw.title.getCurrentTitle() then&lt;br /&gt;
		return string.format(&amp;quot;[[%s|List of episodes]]&amp;quot;, listOfEpisodesArticle)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns an article link.&lt;br /&gt;
--- @param article string The article&amp;#039;s title.&lt;br /&gt;
--- @param pipedLink string The piped link.&lt;br /&gt;
--- @return string&lt;br /&gt;
local function getArticleLink(article, pipedLink)&lt;br /&gt;
	if not pipedLink or pipedLink == &amp;quot;&amp;quot; then&lt;br /&gt;
		return &amp;quot;[[&amp;quot; .. article .. &amp;quot;]]&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;quot;[[&amp;quot; .. article .. &amp;quot;|&amp;quot; .. pipedLink .. &amp;quot;]]&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns the show name and season number from a title.&lt;br /&gt;
--- @param showName string The show&amp;#039;s title.&lt;br /&gt;
--- @return nil | number | string, nil | number | string&lt;br /&gt;
local function getShowNameAndSeasonNumberFromShowName(showName)&lt;br /&gt;
	local _, _, showNameModified, seasonNumber = string.find(showName, &amp;quot;(.*)%s+(%d+)$&amp;quot;)&lt;br /&gt;
	return showNameModified, seasonNumber&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns the current season number from the disambiguation.&lt;br /&gt;
--- @param disambiguation string The article&amp;#039;s disambiguation.&lt;br /&gt;
--- @return string&lt;br /&gt;
local function getCurrentSeasonNumberFromDisambiguation(disambiguation)&lt;br /&gt;
	return match(disambiguation , &amp;quot;%d+&amp;quot;, 1, -1, false, &amp;quot;&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns the type of word used for &amp;quot;season&amp;quot; in the title.&lt;br /&gt;
---&lt;br /&gt;
--- The returned value can be one of three options: &amp;quot;season&amp;quot;, &amp;quot;series&amp;quot;, &amp;quot;story arc&amp;quot; or &amp;quot;specials&amp;quot;.&lt;br /&gt;
--- @param title string The article&amp;#039;s title.&lt;br /&gt;
--- @return string&lt;br /&gt;
local function getSeasonType(title)&lt;br /&gt;
	for _, seasonType in pairs({&amp;quot;season&amp;quot;, &amp;quot;series&amp;quot;, &amp;quot;story arc&amp;quot;, &amp;quot;specials&amp;quot;}) do&lt;br /&gt;
		if string.find(title, seasonType) then&lt;br /&gt;
			return seasonType&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;quot;season&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns the season number from the title.&lt;br /&gt;
--- @param title string The article&amp;#039;s title.&lt;br /&gt;
--- @return string | nil&lt;br /&gt;
local function getSeasonNumber(title)&lt;br /&gt;
	return match(title , &amp;quot;%d+&amp;quot;, 1, -1, false, &amp;quot;&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns the disambiguation from the title.&lt;br /&gt;
--- @param title string The article&amp;#039;s title.&lt;br /&gt;
--- @return string | nil&lt;br /&gt;
local function getDisambiguation(title)&lt;br /&gt;
	local disambiguation = match(title, &amp;quot;%s%((.-)%)&amp;quot;, 1, -1, false, &amp;quot;&amp;quot;)&lt;br /&gt;
	if disambiguation and disambiguation == &amp;quot;&amp;quot; then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	return disambiguation&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns the title without its disambiguation.&lt;br /&gt;
--- @param title string The article&amp;#039;s title.&lt;br /&gt;
--- @return string | nil&lt;br /&gt;
local function getTitleWithoutDisambiguation(title)&lt;br /&gt;
	local disambiguation = getDisambiguation(title)&lt;br /&gt;
	if disambiguation then&lt;br /&gt;
		return string.gsub(title, &amp;quot;%(&amp;quot; .. disambiguation  .. &amp;quot;%)&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
	return title&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns the TV program&amp;#039;s disambiguation.&lt;br /&gt;
--- @param disambiguation string The disambiguation used in the season&amp;#039;s article title.&lt;br /&gt;
--- @return string&lt;br /&gt;
local function getTVProgramDisambiguation(disambiguation)&lt;br /&gt;
	if not disambiguation then&lt;br /&gt;
		return &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Check if the disambiguation is normal &amp;#039;season #&amp;#039; or &amp;#039;series #&amp;#039;.&lt;br /&gt;
	-- If so, remove disambiguation.&lt;br /&gt;
	if string.match(disambiguation, &amp;quot;^season %d*$&amp;quot;) or string.match(disambiguation, &amp;quot;^series %d*$&amp;quot;) then&lt;br /&gt;
		return &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local disambiguationStyle = &amp;quot; (%s)&amp;quot;&lt;br /&gt;
	-- Check if the disambiguation is extended and has &amp;#039;TV series&amp;#039; and isn&amp;#039;t just season #.&lt;br /&gt;
	-- Only leave the TV series disambiguation, not including the season #.&lt;br /&gt;
	-- Example: Teenage Mutant Ninja Turtles (1987 TV series, season 5) will return &amp;#039;1987 TV series&amp;#039;.&lt;br /&gt;
	if string.find(disambiguation, &amp;quot;TV series&amp;quot;) then&lt;br /&gt;
		local shortDisambiguation, _ = disambiguation:match(&amp;quot;^(.*),&amp;quot;)&lt;br /&gt;
		if shortDisambiguation then&lt;br /&gt;
			return string.format(disambiguationStyle, shortDisambiguation)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Check if the disambiguation is extended with country adjective.&lt;br /&gt;
	-- Example: The Office (American season 2) will return &amp;quot;American season 2&amp;quot;.&lt;br /&gt;
	-- Keep only country adjective.&lt;br /&gt;
	local countryDisambiguation = disambiguation:match(&amp;quot;^(.*) season %d*&amp;quot;) or disambiguation:match(&amp;quot;^(.*) series %d*&amp;quot;)&lt;br /&gt;
	local data = mw.loadData(&amp;quot;Module:Country adjective&amp;quot;)&lt;br /&gt;
	local valid_result = data.getCountryFromAdj[countryDisambiguation]&lt;br /&gt;
	-- Check if the country adjective is valid.&lt;br /&gt;
	if valid_result then&lt;br /&gt;
		-- Add &amp;#039;TV series&amp;#039; suffix&lt;br /&gt;
		return string.format(disambiguationStyle, countryDisambiguation .. &amp;quot; TV series&amp;quot;)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Not a known disambiguation style. Use whatever was used in the title or manually added.&lt;br /&gt;
	-- Note: might not be a valid style link.&lt;br /&gt;
	return string.format(disambiguationStyle, disambiguation)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns the show&amp;#039;s name from the title.&lt;br /&gt;
--- @param title string The article&amp;#039;s title.&lt;br /&gt;
--- @return string&lt;br /&gt;
local function getShowName(title)&lt;br /&gt;
	local name, _ = mw.ustring.gsub(title, &amp;quot;season %d*$&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
	name, _ = mw.ustring.gsub(name, &amp;quot;series %d*$&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
	name, _ = mw.ustring.gsub(name, &amp;quot;specials&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
	name, _ = mw.ustring.gsub(name, &amp;quot;story arc %d*$&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
	name = string.match(name, &amp;quot;^%s*(.-)%s*$&amp;quot;) -- Trim spaces.&lt;br /&gt;
	return name&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns &amp;quot;true&amp;quot; if the given link is valid; nil otherwise.&lt;br /&gt;
--- A link is valid in the following cases:&lt;br /&gt;
---	-- A season article exists.&lt;br /&gt;
---	-- A redirect exists to a season section.&lt;br /&gt;
---&lt;br /&gt;
--- A link is invalid in the following cases:&lt;br /&gt;
---	-- A season article or redirect do not exist.&lt;br /&gt;
---	-- A redirect exists, but it is a general redirect and not for any specific season section.&lt;br /&gt;
---&lt;br /&gt;
--- Note: Return values are not booleans as the returned value is used in template space.&lt;br /&gt;
--- @param title string The article&amp;#039;s title.&lt;br /&gt;
--- @return string | nil&lt;br /&gt;
local function isLinkValid(title)&lt;br /&gt;
	local article = mw.title.new(title)&lt;br /&gt;
&lt;br /&gt;
	-- Article or redirect do not exist; Not a valid link.&lt;br /&gt;
	if not article or not article.exists then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local redirectTarget = article.redirectTarget&lt;br /&gt;
&lt;br /&gt;
	-- Article exists and is not a redirect; Valid link.&lt;br /&gt;
	if not redirectTarget then&lt;br /&gt;
		return &amp;quot;true&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local fullLink = redirectTarget.fullText&lt;br /&gt;
	local isSection = fullLink:find(&amp;quot;#&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
	-- Article is a section redirect; Valid link.&lt;br /&gt;
	if isSection then&lt;br /&gt;
		return &amp;quot;true&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Article is a general redirect; Not a valid link.&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns a season article title and a piped link.&lt;br /&gt;
---&lt;br /&gt;
--- The following are the supported season naming styles:&lt;br /&gt;
---	--  Style: &amp;lt;showName&amp;gt; &amp;lt;seasonType&amp;gt; &amp;lt;seasonNumber&amp;gt;&lt;br /&gt;
---		Example: Lost season 2.&lt;br /&gt;
---		Example: Doctor Who series 2.&lt;br /&gt;
---	--  Style: &amp;lt;showName&amp;gt; (&amp;lt;country&amp;gt; TV series) &amp;lt;seasonType&amp;gt; &amp;lt;seasonNumber&amp;gt;&lt;br /&gt;
---		Example: The Office (American TV series) season 2.&lt;br /&gt;
---		Example: Teenage Mutant Ninja Turtles (1987 TV series) season 2&lt;br /&gt;
---		Example: X Factor (British TV series) series 2.&lt;br /&gt;
---		Example: Love Island (British TV series) series 2&lt;br /&gt;
---	--  Style: &amp;lt;showName&amp;gt; (&amp;lt;year&amp;gt; TV series) &amp;lt;seasonType&amp;gt; &amp;lt;seasonNumber&amp;gt;&lt;br /&gt;
---		Example: Love Island (2015 TV series) series 2&lt;br /&gt;
---	--  Style: &amp;lt;showName&amp;gt; (&amp;lt;country&amp;gt; &amp;lt;seasonType&amp;gt;)&lt;br /&gt;
---		Example: Big Brother 2 (American season).&lt;br /&gt;
&lt;br /&gt;
--- @param title string The article&amp;#039;s title.&lt;br /&gt;
--- @param seasonNumberDiff number The number difference between the current season and the other season.&lt;br /&gt;
--- @return string, string&lt;br /&gt;
local function getArticleTitleAndPipedLink(title, seasonNumberDiff)&lt;br /&gt;
	local seasonType = getSeasonType(title)&lt;br /&gt;
	local currentSeasonNumber = getSeasonNumber(title)&lt;br /&gt;
	if tonumber(currentSeasonNumber) == nil then&lt;br /&gt;
		return &amp;quot;&amp;quot;, nil&lt;br /&gt;
	end&lt;br /&gt;
	local seasonNumber = currentSeasonNumber + seasonNumberDiff&lt;br /&gt;
	local modifiedTitle, numberOfReplacements = string.gsub(title, &amp;quot;%d+$&amp;quot;, seasonNumber)&lt;br /&gt;
	local pipedLink = seasonType:gsub(&amp;quot;^%l&amp;quot;, string.upper) .. &amp;quot; &amp;quot; .. seasonNumber&lt;br /&gt;
&lt;br /&gt;
	local disambiguation = getDisambiguation(title)&lt;br /&gt;
	-- Titles such as &amp;quot;Big Brother 2 (American season) and Teenage Mutant Ninja Turtles (1987 TV series) season 2&amp;quot;.&lt;br /&gt;
	if disambiguation then&lt;br /&gt;
		local titleWithoutDisambiguation = string.gsub(title, disambiguation, &amp;quot;_DAB_&amp;quot;)&lt;br /&gt;
		modifiedTitle, numberOfReplacements = string.gsub(titleWithoutDisambiguation, &amp;quot;%d+&amp;quot;, seasonNumber)&lt;br /&gt;
&lt;br /&gt;
		 -- Articles, such as &amp;quot;Hawaii Five-0 (2010 TV series) season 2&amp;quot;, that have a number&lt;br /&gt;
		 -- as part of their title will need an additional fix in order for that number not to change.&lt;br /&gt;
		if numberOfReplacements &amp;gt; 1 then&lt;br /&gt;
			local titleFix = string.match(title, &amp;quot;%d+&amp;quot;, 1)&lt;br /&gt;
			modifiedTitle = string.gsub(modifiedTitle, &amp;quot;%d+&amp;quot;, titleFix, 1)&lt;br /&gt;
		end&lt;br /&gt;
	&lt;br /&gt;
		modifiedTitle = string.gsub(modifiedTitle, &amp;quot;_DAB_&amp;quot;, disambiguation)&lt;br /&gt;
		return modifiedTitle, pipedLink&lt;br /&gt;
&lt;br /&gt;
	-- Titles such as &amp;quot;Big Brother Brasil 2&amp;quot;.&lt;br /&gt;
	elseif not string.find(title, seasonType) then&lt;br /&gt;
		return modifiedTitle, nil&lt;br /&gt;
&lt;br /&gt;
	-- Invalid usages of TV series articles with the television season infobox.&lt;br /&gt;
	elseif disambiguation and string.find(disambiguation, &amp;quot;TV series&amp;quot;) and not (string.find(disambiguation, &amp;quot;, season&amp;quot;) or string.find(disambiguation, &amp;quot;, series&amp;quot;))  then&lt;br /&gt;
		return &amp;quot;&amp;quot;, nil&lt;br /&gt;
&lt;br /&gt;
	-- Standard titles such as &amp;quot;Lost season 1&amp;quot;.&lt;br /&gt;
	else&lt;br /&gt;
		return modifiedTitle, pipedLink&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns the article&amp;#039;s title either from args (usually from /testcases) or from the page itself.&lt;br /&gt;
--- @param frame table The frame invoking the module.&lt;br /&gt;
--- @return string&lt;br /&gt;
local function getTitle(frame)&lt;br /&gt;
	local getArgs = require(&amp;quot;Module:Arguments&amp;quot;).getArgs&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
	if args.italic_title then&lt;br /&gt;
		return &amp;quot;no&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local title = args.title&lt;br /&gt;
	if not title then&lt;br /&gt;
		title = mw.title.getCurrentTitle().text&lt;br /&gt;
	end&lt;br /&gt;
	return title&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns &amp;quot;true&amp;quot; if the given season link is valid; nil otherwise.&lt;br /&gt;
--- @param frame table The frame invoking the module.&lt;br /&gt;
--- @param seasonNumberDiff number The number difference between the current season and the other season.&lt;br /&gt;
--- @return string | nil&lt;br /&gt;
local function isSeasonLinkValid(frame, seasonNumberDiff)&lt;br /&gt;
	local title = getTitle(frame)&lt;br /&gt;
	local articleTitle, _ = getArticleTitleAndPipedLink(title, seasonNumberDiff)&lt;br /&gt;
	return isLinkValid(articleTitle)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns a season article link.&lt;br /&gt;
--- @param frame table The frame invoking the module.&lt;br /&gt;
--- @param seasonNumberDiff number The number difference between the current season and the other season.&lt;br /&gt;
--- @return string&lt;br /&gt;
local function getSeasonArticleLink(frame, seasonNumberDiff)&lt;br /&gt;
	local title = getTitle(frame)&lt;br /&gt;
	local articleTitle, pipedLink = getArticleTitleAndPipedLink(title, seasonNumberDiff)&lt;br /&gt;
	return getArticleLink(articleTitle, pipedLink)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns &amp;quot;true&amp;quot; if the season link for the next season is valid; nil otherwise.&lt;br /&gt;
--- @param frame table The frame invoking the module.&lt;br /&gt;
--- @return string | nil&lt;br /&gt;
function p.isNextSeasonLinkValid(frame)&lt;br /&gt;
	return isSeasonLinkValid(frame, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns &amp;quot;true&amp;quot; if the season link for the previous season is valid; nil otherwise.&lt;br /&gt;
--- @param frame table The frame invoking the module.&lt;br /&gt;
--- @return string | nil&lt;br /&gt;
function p.isPrevSeasonLinkValid(frame)&lt;br /&gt;
	return isSeasonLinkValid(frame, -1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns &amp;quot;true&amp;quot; if the season link for the previous or next season is valid; nil otherwise.&lt;br /&gt;
--- @param frame table The frame invoking the module.&lt;br /&gt;
--- @return string | nil&lt;br /&gt;
function p.isPrevOrNextSeasonLinkValid(frame)&lt;br /&gt;
	if p.isPrevSeasonLinkValid(frame) == &amp;quot;true&amp;quot; then&lt;br /&gt;
		return &amp;quot;true&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	return p.isNextSeasonLinkValid(frame)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns the next season article title.&lt;br /&gt;
--- @param frame table The frame invoking the module.&lt;br /&gt;
--- @return string&lt;br /&gt;
function p.getNextSeasonArticle(frame)&lt;br /&gt;
	return getSeasonArticleLink(frame, 1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns the previous season article title.&lt;br /&gt;
--- @param frame table The frame invoking the module.&lt;br /&gt;
--- @return string&lt;br /&gt;
function p.getPrevSeasonArticle(frame)&lt;br /&gt;
	return getSeasonArticleLink(frame, -1)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns the type of season word used - &amp;quot;season&amp;quot; or &amp;quot;series&amp;quot;.&lt;br /&gt;
--- @param frame table The frame invoking the module.&lt;br /&gt;
--- @return string&lt;br /&gt;
function p.getSeasonWord(frame)&lt;br /&gt;
	local title = getTitle(frame)&lt;br /&gt;
	title = getTitleWithoutDisambiguation(title)&lt;br /&gt;
	local seasonType = getSeasonType(title)&lt;br /&gt;
	return seasonType&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns an {{Italic title}} instance if title qualifies or a blank string.&lt;br /&gt;
&lt;br /&gt;
--- @param frame table&lt;br /&gt;
--- @return string&lt;br /&gt;
function p.getItalicTitle(frame)&lt;br /&gt;
	local getArgs = require(&amp;quot;Module:Arguments&amp;quot;).getArgs&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
	&lt;br /&gt;
	-- If italic_title is set then &amp;quot;no&amp;quot; is the only valid value.&lt;br /&gt;
	-- Don&amp;#039;t set an italic title.&lt;br /&gt;
	if args.italic_title then&lt;br /&gt;
		return &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local title = getTitle(frame)&lt;br /&gt;
	title = getShowName(getTitleWithoutDisambiguation(title))&lt;br /&gt;
&lt;br /&gt;
	-- If the infobox is used on List of articles don&amp;#039;t set an italic title.&lt;br /&gt;
	-- TODO: this can be fixed in the future but current usages use a manual display title.&lt;br /&gt;
	if string.find(title, &amp;quot;List of&amp;quot;) then&lt;br /&gt;
		return &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return frame:expandTemplate{title = &amp;quot;Italic title&amp;quot;, args = {string = title}}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns the text used for the |above= field of the infobox.&lt;br /&gt;
---&lt;br /&gt;
--- @param frame table&lt;br /&gt;
--- @return string&lt;br /&gt;
function p.getAboveTitle(frame)&lt;br /&gt;
	local getArgs = require(&amp;quot;Module:Arguments&amp;quot;).getArgs&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
	local title = getTitle(frame)&lt;br /&gt;
	title = getShowName(getTitleWithoutDisambiguation(title))&lt;br /&gt;
	return title&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns the text used for the |subheader= field of the infobox.&lt;br /&gt;
---&lt;br /&gt;
--- The text is returned in the format of &amp;quot;Season #&amp;quot; or &amp;quot;Series #&amp;quot;,&lt;br /&gt;
--- depending on either what the article disambiguation uses, or on the manually entered parameters of the infobox.&lt;br /&gt;
--- @param frame table The frame invoking the module.&lt;br /&gt;
--- @return string | nil&lt;br /&gt;
function p.getSubHeader(frame)&lt;br /&gt;
	local getArgs = require(&amp;quot;Module:Arguments&amp;quot;).getArgs&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
&lt;br /&gt;
	local seasonType&lt;br /&gt;
	local seasonNumber&lt;br /&gt;
	if args.season_number then&lt;br /&gt;
		seasonType = &amp;quot;Season&amp;quot;&lt;br /&gt;
		seasonNumber = args.season_number&lt;br /&gt;
	elseif args.series_number then&lt;br /&gt;
		seasonType = &amp;quot;Series&amp;quot;&lt;br /&gt;
		seasonNumber = args.series_number&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if not seasonNumber then&lt;br /&gt;
		local title = getTitle(frame)&lt;br /&gt;
		local titleWithoutDisambiguation = getTitleWithoutDisambiguation(title)&lt;br /&gt;
		seasonNumber = getSeasonNumber(titleWithoutDisambiguation)&lt;br /&gt;
		seasonType = getSeasonType(titleWithoutDisambiguation)&lt;br /&gt;
		&lt;br /&gt;
		-- For pages like &amp;quot;Doctor Who specials (2008–2010)&amp;quot;.&lt;br /&gt;
		if seasonType == &amp;quot;specials&amp;quot; then&lt;br /&gt;
			local disambiguation = getDisambiguation(title) or &amp;quot;&amp;quot;&lt;br /&gt;
			return disambiguation .. &amp;quot; &amp;quot; .. seasonType&lt;br /&gt;
		end&lt;br /&gt;
		seasonType = seasonType:sub(1, 1):upper() .. seasonType:sub(2)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if seasonNumber and seasonNumber ~= &amp;quot;&amp;quot; then&lt;br /&gt;
		return seasonType .. &amp;quot; &amp;quot; .. seasonNumber&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--- Returns a formatted link to the list of episodes article.&lt;br /&gt;
---&lt;br /&gt;
--- The returned link is in the style of:&lt;br /&gt;
--- [List of &amp;lt;series name&amp;gt; &amp;lt;disambiguation, if present&amp;gt; episodes &amp;lt;range, if present&amp;gt;|List of episodes]&lt;br /&gt;
---&lt;br /&gt;
--- The link will only return if the page exists.&lt;br /&gt;
--- @param frame table The frame invoking the module.&lt;br /&gt;
--- @return string | nil&lt;br /&gt;
function p.getListOfEpisodes(frame)&lt;br /&gt;
	local getArgs = require(&amp;quot;Module:Arguments&amp;quot;).getArgs&lt;br /&gt;
	local args = getArgs(frame)&lt;br /&gt;
&lt;br /&gt;
	if args.link then&lt;br /&gt;
		-- Parameter should be unformatted.&lt;br /&gt;
		if string.find(args.link, &amp;quot;%[&amp;quot;) then&lt;br /&gt;
			local delink = require(&amp;quot;Module:Delink&amp;quot;)._delink&lt;br /&gt;
			args.link = delink({args.link, wikilinks = &amp;quot;target&amp;quot;})&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		return getListOfEpisodesLink(args.link)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local title = getTitle(frame)&lt;br /&gt;
	local showName = getShowName(getTitleWithoutDisambiguation(title))&lt;br /&gt;
	if showName then&lt;br /&gt;
		local disambiguation = getDisambiguation(title)&lt;br /&gt;
		if disambiguation then&lt;br /&gt;
			disambiguation = &amp;quot; (&amp;quot; .. disambiguation .. &amp;quot;)&amp;quot;&lt;br /&gt;
		end&lt;br /&gt;
		local listOfEpisodesArticle = string.format(&amp;quot;List of %s%s episodes&amp;quot;, showName, disambiguation or &amp;quot;&amp;quot;)&lt;br /&gt;
		return getListOfEpisodesLink(listOfEpisodesArticle)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>&gt;Gonnym</name></author>
	</entry>
</feed>