Module:Infobox television disambiguation check
-- This module requires the use of the following modules.
 local getArgs = require('Module:Arguments').getArgs
 local validateDisambiguation = require('Module:Television infoboxes disambiguation check')
 
 local p = {}
 
 local validDisambiguationTypeList = {
 	&quot;TV series&quot;,
 	&quot;TV programme&quot;,
 	&quot;TV program&quot;,
 	&quot;TV film&quot;,
 	&quot;film&quot;,
 	&quot;miniseries&quot;,
 	&quot;serial&quot;,
 	&quot;game show&quot;,
 	&quot;talk show&quot;,
 	&quot;web series&quot;
 }
 
 local validDisambiguationPatternList  = {
 	validateDisambiguation.DisambiguationPattern{pattern = &quot;^(%d+) (%D+)&quot;, type = 1}, --&quot;VALIDATION_TYPE_YEAR_COUNTRY&quot;
 	validateDisambiguation.DisambiguationPattern{pattern = &quot;^%d+$&quot;, type = 2}, --&quot;VALIDATION_TYPE_YEAR&quot;
 	validateDisambiguation.DisambiguationPattern{pattern = &quot;^%D+$&quot;, type = 3} --&quot;VALIDATION_TYPE_COUNTRY&quot;
 }
 
 local exceptionList = {
 	&quot;The (206)&quot;,
 	&quot;Bigg Boss (Hindi TV series)&quot;,
 	&quot;Bigg Boss (Malayalam TV series)&quot;,
 	&quot;Bigg Boss (Telugu TV series)&quot;,
 	&quot;Cinderella (Apakah Cinta Hanyalah Mimpi?)&quot;,
 	&quot;Deal or No Deal Malaysia (English-language game show)&quot;,
 	&quot;Deal or No Deal Malaysia (Mandarin-language game show)&quot;,
 	&quot;How to Live with Your Parents (For the Rest of Your Life)&quot;,
 	&quot;How to Sell Drugs Online (Fast)&quot;,
 	&quot;I (Almost) Got Away With It&quot;,
 	&quot;Kevin (Probably) Saves the World&quot;,
 	&quot;Monty Python: Almost the Truth (Lawyers Cut)&quot;,
 	&quot;Off Sides (Pigs vs. Freaks)&quot;,
 	&quot;Randall and Hopkirk (Deceased)&quot;,
 	&quot;Who the (Bleep)...&quot;,
 	&quot;Who the (Bleep) Did I Marry?&quot;,
 }
 
 local otherInfoboxList = {
 	[&quot;franchise&quot;] = &quot;[[Category:Television articles using incorrect infobox|FRANCHISE]]&quot;,
 	[&quot;radio&quot;] = &quot;[[Category:Television articles using incorrect infobox|R]]&quot;,
 	[&quot;season&quot;] = &quot;[[Category:Television articles using incorrect infobox|S]]&quot;,
 	[&quot;series %d*&quot;] = &quot;[[Category:Television articles using incorrect infobox|S]]&quot;,
 	[&quot;TV programming block&quot;] = &quot;[[Category:Television articles using incorrect infobox|P]]&quot;,
 	[&quot;film series&quot;] = &quot;[[Category:Television articles using incorrect infobox|FILM]]&quot;
 }
 
 -- Empty for now.
 local invalidTitleStyleList = {}
 
 local function _main(args)
 	local title = args[1]
 	return validateDisambiguation.main(title, &quot;infobox television&quot;, validDisambiguationTypeList, validDisambiguationPatternList, exceptionList, otherInfoboxList, invalidTitleStyleList)
 end
 
 function p.main(frame)
 	local args = getArgs(frame)
 	local category, debugString = _main(args)
 	return category
 end
 
 local function removeFromArray(t, delete)
     local j = 1
     local n = #t
 
     for i = 1, n do
         if (t[i] ~= delete) then
             -- Move i's kept value to j's position, if it's not already there.
             if (i ~= j) then
                 t[j] = t[i]
                 t[i] = nil
             end
             j = j + 1 -- Increment position of where we'll place the next kept value.
         else
             t[i] = nil
         end
     end
 
     return t
 end
 
 function p.getDisambiguationTypeList()
 	return removeFromArray(validDisambiguationTypeList, &quot;TV series&quot;)
 end
 
 function p.test(frame)
 	local args = getArgs(frame)
 	local category, debugString = _main(args)
 	return debugString
 end