Module:Ep/YTURLSwitcher

local p = {}

function p.epYTURL(frame) local ep = frame.args[1] or frame.args["ep"] local part = frame.args["part"] local runtime = frame.args["runtime"] local result

local epURLs = mw.loadData('Module:Ep/YTURLSwitcher/URLs') if epURLs[ep] == nil then return "" end if runtime == "1" then return epURLs[ep].runtime end if epURLs[ep].url == nil then if part == "1" then result = epURLs[ep].url1 else result = epURLs[ep].url2 end else result = epURLs[ep].url end

return result

end

return p