<div dir="ltr"><pre style="margin-top:0px;margin-bottom:0px;padding:0px;border:0px;font-size:12px;font-family:Consolas,'Liberation Mono',Courier,monospace;color:rgb(51,51,51);line-height:18px"><div class="" id="LC1" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- Global variables</span></div><div class="" id="LC2" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px">dlg</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span></div>

<div class="" id="LC3" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px">dialog_is_opened</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">false</span></div>

<div class="" id="LC4" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px">dialog_is_hidden</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">false</span></div>

<div class="" id="LC5" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px">update_title_needed</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">false</span></div>

<div class="" id="LC6" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px">website</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span></div>

<div class="" id="LC7" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px">language</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span></div>

<div class="" id="LC8" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px">main_text_input</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span></div>

<div class="" id="LC9" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px">search_button</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span></div>

<div class="" id="LC10" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px">load_button</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span></div>

<div class="" id="LC11" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px">subtitles_list</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span></div>

<div class="" id="LC12" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px">subtitles_result</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span></div>

<div class="" id="LC13" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px">type_text_input</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span></div>

<div class="" id="LC14" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC15" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- Extension description</span></div>

<div class="" id="LC16" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">function</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,0,0);font-weight:bold">descriptor</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC17" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px">{</span></div>

<div class="" id="LC18" style="margin:0px;padding:0px 0px 0px 10px;border:0px">             <span class="" style="margin:0px;padding:0px;border:0px">title</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">AutoSubtitles"</span><span class="" style="margin:0px;padding:0px;border:0px">;</span></div>

<div class="" id="LC19" style="margin:0px;padding:0px 0px 0px 10px;border:0px">             <span class="" style="margin:0px;padding:0px;border:0px">version</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">1"</span><span class="" style="margin:0px;padding:0px;border:0px">;</span></div>

<div class="" id="LC20" style="margin:0px;padding:0px 0px 0px 10px;border:0px">             <span class="" style="margin:0px;padding:0px;border:0px">author</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">jean caffou"</span><span class="" style="margin:0px;padding:0px;border:0px">;</span></div>

<div class="" id="LC21" style="margin:0px;padding:0px 0px 0px 10px;border:0px">             <span class="" style="margin:0px;padding:0px;border:0px">url</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">'</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)"><a href="http://www.kafol.net">http://www.kafol.net</a>'</span><span class="" style="margin:0px;padding:0px;border:0px">;</span></div>

<div class="" id="LC22" style="margin:0px;padding:0px 0px 0px 10px;border:0px">             <span class="" style="margin:0px;padding:0px;border:0px">description</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px">;</span></div>

<div class="" id="LC23" style="margin:0px;padding:0px 0px 0px 10px;border:0px">             <span class="" style="margin:0px;padding:0px;border:0px">shortdesc</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px">;</span></div>

<div class="" id="LC24" style="margin:0px;padding:0px 0px 0px 10px;border:0px">             <span class="" style="margin:0px;padding:0px;border:0px">capabilities</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">{</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">input-listener"</span> <span class="" style="margin:0px;padding:0px;border:0px">;</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">meta-listener"</span> <span class="" style="margin:0px;padding:0px;border:0px">}</span></div>

<div class="" id="LC25" style="margin:0px;padding:0px 0px 0px 10px;border:0px">     <span class="" style="margin:0px;padding:0px;border:0px">}</span></div><div class="" id="LC26" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC27" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC28" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- Get clean title from filename</span></div><div class="" id="LC29" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">function</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,0,0);font-weight:bold">get_title</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">str</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC30" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">item</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">item</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">or</span> <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">input</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">item</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC31" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">not</span> <span class="" style="margin:0px;padding:0px;border:0px">item</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC32" style="margin:0px;padding:0px 0px 0px 10px;border:0px">        <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span></div>

<div class="" id="LC33" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC34" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">metas</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">item</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">metas</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC35" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">metas</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">title"</span><span class="" style="margin:0px;padding:0px;border:0px">]</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC36" style="margin:0px;padding:0px 0px 0px 10px;border:0px">        <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px">metas</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">title"</span><span class="" style="margin:0px;padding:0px;border:0px">]</span></div>

<div class="" id="LC37" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">else</span></div><div class="" id="LC38" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

        <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">filename</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">string.gsub</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">item</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">name</span><span class="" style="margin:0px;padding:0px;border:0px">(),</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">^(.+)%.%w+$"</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">%1"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC39" style="margin:0px;padding:0px 0px 0px 10px;border:0px">        <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px">trim</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">filename</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">or</span> <span class="" style="margin:0px;padding:0px;border:0px">item</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">name</span><span class="" style="margin:0px;padding:0px;border:0px">())</span></div>

<div class="" id="LC40" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC41" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC42" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC43" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- Remove leading and trailing spaces</span></div><div class="" id="LC44" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">function</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,0,0);font-weight:bold">trim</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">str</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC45" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">not</span> <span class="" style="margin:0px;padding:0px;border:0px">str</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div>

<div class="" id="LC46" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">string.gsub</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">str</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">^%s*(.-)%s*$"</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">%1"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC47" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC48" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC49" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- Function triggered when the extension is activated</span></div>

<div class="" id="LC50" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">function</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,0,0);font-weight:bold">activate</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC51" style="margin:0px;padding:0px 0px 0px 10px;border:0px">     <span class="" style="margin:0px;padding:0px;border:0px">new_dialog</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Download subtitles"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC52" style="margin:0px;padding:0px 0px 0px 10px;border:0px">     <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px">show_dialog_download</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC53" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC54" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC55" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- Function triggered when the extension is deactivated</span></div>

<div class="" id="LC56" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">function</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,0,0);font-weight:bold">deactivate</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC57" style="margin:0px;padding:0px 0px 0px 10px;border:0px">     <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">dialog_is_opened</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC58" style="margin:0px;padding:0px 0px 0px 10px;border:0px">             <span class="" style="margin:0px;padding:0px;border:0px">close</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC59" style="margin:0px;padding:0px 0px 0px 10px;border:0px">     <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">else</span></div><div class="" id="LC60" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

                <span class="" style="margin:0px;padding:0px;border:0px">reset_variables</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div><div class="" id="LC61" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

                <span class="" style="margin:0px;padding:0px;border:0px">dlg</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span></div>

<div class="" id="LC62" style="margin:0px;padding:0px 0px 0px 10px;border:0px">     <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC63" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

        <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">true</span></div><div class="" id="LC64" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC65" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC66" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- self explanatory</span></div><div class="" id="LC67" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">function</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,0,0);font-weight:bold">reset_variables</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC68" style="margin:0px;padding:0px 0px 0px 10px;border:0px">     <span class="" style="margin:0px;padding:0px;border:0px">update_title_needed</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">false</span></div>

<div class="" id="LC69" style="margin:0px;padding:0px 0px 0px 10px;border:0px">     <span class="" style="margin:0px;padding:0px;border:0px">website</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span></div>

<div class="" id="LC70" style="margin:0px;padding:0px 0px 0px 10px;border:0px">     <span class="" style="margin:0px;padding:0px;border:0px">language</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span></div>

<div class="" id="LC71" style="margin:0px;padding:0px 0px 0px 10px;border:0px">     <span class="" style="margin:0px;padding:0px;border:0px">main_text_input</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span></div>

<div class="" id="LC72" style="margin:0px;padding:0px 0px 0px 10px;border:0px">     <span class="" style="margin:0px;padding:0px;border:0px">search_button</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span></div>

<div class="" id="LC73" style="margin:0px;padding:0px 0px 0px 10px;border:0px">     <span class="" style="margin:0px;padding:0px;border:0px">load_button</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span></div>

<div class="" id="LC74" style="margin:0px;padding:0px 0px 0px 10px;border:0px">     <span class="" style="margin:0px;padding:0px;border:0px">subtitles_list</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span></div>

<div class="" id="LC75" style="margin:0px;padding:0px 0px 0px 10px;border:0px">     <span class="" style="margin:0px;padding:0px;border:0px">subtitles_result</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span></div>

<div class="" id="LC76" style="margin:0px;padding:0px 0px 0px 10px;border:0px">     <span class="" style="margin:0px;padding:0px;border:0px">type_text_input</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span></div>

<div class="" id="LC77" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC78" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC79" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- Function triggered when the dialog is closed</span></div>

<div class="" id="LC80" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">function</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,0,0);font-weight:bold">close</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC81" style="margin:0px;padding:0px 0px 0px 10px;border:0px">     <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">true</span></div>

<div class="" id="LC82" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC83" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC84" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- Current input changed</span></div>

<div class="" id="LC85" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">function</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,0,0);font-weight:bold">input_changed</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC86" style="margin:0px;padding:0px 0px 0px 10px;border:0px">     <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">dbg</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Input is changed"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC87" style="margin:0px;padding:0px 0px 0px 10px;border:0px">     <span class="" style="margin:0px;padding:0px;border:0px">update_title</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC88" style="margin:0px;padding:0px 0px 0px 10px;border:0px">     <span class="" style="margin:0px;padding:0px;border:0px">click_search</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC89" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC90" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC91" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- Update title in search dialog</span></div>

<div class="" id="LC92" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">function</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,0,0);font-weight:bold">update_title</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC93" style="margin:0px;padding:0px 0px 0px 10px;border:0px">     <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">dialog_is_hidden</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">or</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">not</span> <span class="" style="margin:0px;padding:0px;border:0px">update_title_needed</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">true</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div>

<div class="" id="LC94" style="margin:0px;padding:0px 0px 0px 10px;border:0px">     <span class="" style="margin:0px;padding:0px;border:0px">main_text_input</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">set_text</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">get_title</span><span class="" style="margin:0px;padding:0px;border:0px">())</span></div>

<div class="" id="LC95" style="margin:0px;padding:0px 0px 0px 10px;border:0px">     <span class="" style="margin:0px;padding:0px;border:0px">dlg</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">update</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC96" style="margin:0px;padding:0px 0px 0px 10px;border:0px">     <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">false</span></div>

<div class="" id="LC97" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC98" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC99" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">function</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,0,0);font-weight:bold">show_dialog_download</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC100" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- column, row, colspan, rowspan</span></div>

<div class="" id="LC101" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">dlg</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">add_label</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)"><right><b>Database: </b></right>"</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC102" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">website</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">dlg</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">add_dropdown</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">2</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">3</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC103" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC104" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px">dlg</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">add_label</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)"><right><b>Language: </b></right>"</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">2</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC105" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">language</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">dlg</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">add_dropdown</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">2</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">2</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">3</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC106" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC107" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px">dlg</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">add_label</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)"><right><b>Search: </b></right>"</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">3</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC108" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">main_text_input</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">dlg</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">add_text_input</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">2</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">3</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC109" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">search_button</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">dlg</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">add_button</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Search"</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">click_search</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">3</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">3</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC110" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">--dlg:add_button("Hide", hide_dialog, 4, 3, 1, 1)</span></div>

<div class="" id="LC111" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC112" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">for</span> <span class="" style="margin:0px;padding:0px;border:0px">idx</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">ws</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">in</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">ipairs</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">websites</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">do</span></div>

<div class="" id="LC113" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">website</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">add_value</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">ws</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">title</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">idx</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC114" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC115" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

        <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">for</span> <span class="" style="margin:0px;padding:0px;border:0px">idx</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">ws</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">in</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">ipairs</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">languages</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">do</span></div>

<div class="" id="LC116" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">language</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">add_value</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">ws</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">title</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">idx</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC117" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC118" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC119" style="margin:0px;padding:0px 0px 0px 10px;border:0px">      <span class="" style="margin:0px;padding:0px;border:0px">update_title_needed</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">true</span></div>

<div class="" id="LC120" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">update_title</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC121" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">click_search</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC122" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">dlg</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">update</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC123" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">true</span></div>

<div class="" id="LC124" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC125" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC126" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">function</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,0,0);font-weight:bold">new_dialog</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">title</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC127" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">dlg</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC128" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">dlg</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">dialog</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">title</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC129" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC130" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC131" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC132" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">function</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,0,0);font-weight:bold">hide_dialog</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC133" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">dialog_is_hidden</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">true</span></div>

<div class="" id="LC134" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">dlg</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">hide</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC135" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC136" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC137" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">function</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,0,0);font-weight:bold">click_search</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC138" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">search_term</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">main_text_input</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">get_text</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC139" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">search_term</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">false</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div>

<div class="" id="LC140" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC141" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">old_button_name</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">search_button</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">get_text</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC142" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">search_button</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">set_text</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Wait..."</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC143" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">subtitles_list</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">~=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span> <span class="" style="margin:0px;padding:0px;border:0px">subtitles_list</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">clear</span><span class="" style="margin:0px;padding:0px;border:0px">()</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div>

<div class="" id="LC144" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">dlg</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">update</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC145" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC146" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px">subtitles_result</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span></div>

<div class="" id="LC147" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC148" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">idx</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">website</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">get_value</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC149" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">idx2</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">language</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">get_value</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC150" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">idx</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold"><</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">or</span> <span class="" style="margin:0px;padding:0px;border:0px">idx2</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold"><</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span> <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">err</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Invalid index in dropdown"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px">search_button</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">set_text</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">old_button_name</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">false</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div>

<div class="" id="LC151" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC152" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">ws</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">websites</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px">idx</span><span class="" style="margin:0px;padding:0px;border:0px">]</span></div>

<div class="" id="LC153" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">lang</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">languages</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px">idx2</span><span class="" style="margin:0px;padding:0px;border:0px">]</span></div>

<div class="" id="LC154" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">url</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">ws</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">urlfunc</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">search_term</span><span class="" style="margin:0px;padding:0px;border:0px">,</span><span class="" style="margin:0px;padding:0px;border:0px">lang</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">tag</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC155" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC156" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- <a href="http://vlc.msg.info">vlc.msg.info</a>("Url: '" .. url .. "'")</span></div>

<div class="" id="LC157" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">stream</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">stream</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">url</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC158" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">stream</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span> <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">err</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">The site of subtitles isn't reachable"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px">search_button</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">set_text</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">old_button_name</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">false</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div>

<div class="" id="LC159" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC160" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">reading</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">blah"</span></div>

<div class="" id="LC161" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">xmlpage</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span></div>

<div class="" id="LC162" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">while</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">reading</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">~=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">and</span> <span class="" style="margin:0px;padding:0px;border:0px">reading</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">~=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">do</span></div>

<div class="" id="LC163" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">reading</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">stream</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">read</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">65653</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC164" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">reading</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC165" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px">xmlpage</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">xmlpage</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span> <span class="" style="margin:0px;padding:0px;border:0px">reading</span></div>

<div class="" id="LC166" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC167" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

        <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC168" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">xmlpage</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span> <span class="" style="margin:0px;padding:0px;border:0px">search_button</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">set_text</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">old_button_name</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">false</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div>

<div class="" id="LC169" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC170" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px">subtitles_result</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">ws</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">parsefunc</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">xmlpage</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC171" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC172" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">subtitles_list</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC173" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">subtitles_list</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">dlg</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">add_list</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">4</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">4</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC174" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">load_button</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">dlg</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">add_button</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Load selected subtitles"</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">click_load_from_search_button</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">5</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">4</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC175" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC176" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC177" style="margin:0px;padding:0px 0px 0px 10px;border:0px">      <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">not</span> <span class="" style="margin:0px;padding:0px;border:0px">subtitles_result</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC178" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">subtitles_result</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">{}</span></div>

<div class="" id="LC179" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">subtitles_result</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">]</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">{</span> <span class="" style="margin:0px;padding:0px;border:0px">url</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">-1"</span> <span class="" style="margin:0px;padding:0px;border:0px">}</span></div>

<div class="" id="LC180" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">subtitles_list</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">add_value</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Nothing found"</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC181" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">search_button</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">set_text</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">old_button_name</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC182" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">dlg</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">update</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC183" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">false</span></div>

<div class="" id="LC184" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC185" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC186" style="margin:0px;padding:0px 0px 0px 10px;border:0px">      <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">for</span> <span class="" style="margin:0px;padding:0px;border:0px">idx</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">res</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">in</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">ipairs</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">subtitles_result</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">do</span></div>

<div class="" id="LC187" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">not</span> <span class="" style="margin:0px;padding:0px;border:0px">res</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">language</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">or</span> <span class="" style="margin:0px;padding:0px;border:0px">lang</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">tag</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">all"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">or</span> <span class="" style="margin:0px;padding:0px;border:0px">lang</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">tag</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px">res</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">language</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC188" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px">subtitles_list</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">add_value</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">["</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span><span class="" style="margin:0px;padding:0px;border:0px">res</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">language</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">] "</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span><span class="" style="margin:0px;padding:0px;border:0px">res</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">name</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">idx</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC189" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC190" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

        <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC191" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC192" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

        <span class="" style="margin:0px;padding:0px;border:0px">search_button</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">set_text</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">old_button_name</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC193" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">dlg</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">update</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC194" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC195" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px">load_first_result</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC196" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC197" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">true</span></div>

<div class="" id="LC198" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC199" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC200" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">function</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,0,0);font-weight:bold">load_unknown_subtitles</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">url</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">language</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC201" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">dbg</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Loading "</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span><span class="" style="margin:0px;padding:0px;border:0px">language</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)"> subtitle: "</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span><span class="" style="margin:0px;padding:0px;border:0px">url</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC202" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">input</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">add_subtitle</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">url</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC203" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC204" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC205" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">function</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,0,0);font-weight:bold">load_subtitles_in_the_archive</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">dataBuffer</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">language</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC206" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">buffer_length</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">dataBuffer</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">len</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC207" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">files_found_in_the_compressed_file</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">0</span></div>

<div class="" id="LC208" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">subtitles_found_in_the_compressed_file</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">0</span></div>

<div class="" id="LC209" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">endIdx</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span></div>

<div class="" id="LC210" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">srturl</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">extension</span></div>

<div class="" id="LC211" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC212" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- Find subtitles</span></div>

<div class="" id="LC213" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">while</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">endIdx</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold"><</span> <span class="" style="margin:0px;padding:0px;border:0px">buffer_length</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">do</span></div>

<div class="" id="LC214" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">_</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">endIdx</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">srturl</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">extension</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">dataBuffer</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">find</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)"><location>([^<]+)%.(%a%a%a?)</location>"</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">endIdx</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC215" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">srturl</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span> <span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">break</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div>

<div class="" id="LC216" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC217" style="margin:0px;padding:0px 0px 0px 10px;border:0px">          <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">--vlc.msg.dbg("File found in the archive: " .. srturl .. extension)</span></div>

<div class="" id="LC218" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">files_found_in_the_compressed_file</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">files_found_in_the_compressed_file</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">+</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span></div>

<div class="" id="LC219" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">srturl</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">string.gsub</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">srturl</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">^(%a%a%a)://"</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">%1://http://"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC220" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC221" style="margin:0px;padding:0px 0px 0px 10px;border:0px">          <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">extension</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">ass"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">or</span> <span class="" style="margin:0px;padding:0px;border:0px">extension</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">ssa"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">or</span> <span class="" style="margin:0px;padding:0px;border:0px">extension</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">srt"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">or</span> <span class="" style="margin:0px;padding:0px;border:0px">extension</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">smi"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">or</span> <span class="" style="margin:0px;padding:0px;border:0px">extension</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">sub"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">or</span> <span class="" style="margin:0px;padding:0px;border:0px">extension</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">rt"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">or</span> <span class="" style="margin:0px;padding:0px;border:0px">extension</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">txt"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">or</span> <span class="" style="margin:0px;padding:0px;border:0px">extension</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">mpl"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC222" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px">subtitles_found_in_the_compressed_file</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">subtitles_found_in_the_compressed_file</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">+</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span></div>

<div class="" id="LC223" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">dbg</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Loading "</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span><span class="" style="margin:0px;padding:0px;border:0px">language</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)"> subtitle: "</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span><span class="" style="margin:0px;padding:0px;border:0px">srturl</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC224" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">input</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">add_subtitle</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">srturl</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">."</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span><span class="" style="margin:0px;padding:0px;border:0px">extension</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC225" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC226" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

        <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC227" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">info</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Files found in the compressed file: "</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span><span class="" style="margin:0px;padding:0px;border:0px">files_found_in_the_compressed_file</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC228" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">info</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Subtitles found in the compressed file: "</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span><span class="" style="margin:0px;padding:0px;border:0px">subtitles_found_in_the_compressed_file</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC229" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC230" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">subtitles_found_in_the_compressed_file</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">></span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">0</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">true</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div>

<div class="" id="LC231" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC232" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">warn</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">No subtitles found in the compressed file"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC233" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">false</span></div>

<div class="" id="LC234" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC235" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC236" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">function</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,0,0);font-weight:bold">parse_archive</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">url</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">language</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC237" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">url</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">-1"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span> <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">dbg</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Dummy result"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">true</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div>

<div class="" id="LC238" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC239" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">stream</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">stream</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">url</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC240" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">stream</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span> <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">err</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">The site of subtitles isn't reachable"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">false</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div>

<div class="" id="LC241" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">stream</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">addfilter</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">zip,stream_filter_rar"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC242" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC243" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">data</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">stream</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">read</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">2048</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC244" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">data</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">or</span> <span class="" style="margin:0px;padding:0px;border:0px">data</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">find</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)"><?xml version"</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">true</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">~=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC245" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">info</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Type: RAR or unknown file"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC246" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">load_unknown_subtitles</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">url</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">language</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC247" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">else</span></div><div class="" id="LC248" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

                <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">info</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Type: ZIP file"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC249" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">dataBuffer</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span></div>

<div class="" id="LC250" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">while</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">data</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">~=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">and</span> <span class="" style="margin:0px;padding:0px;border:0px">data</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">~=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">do</span></div>

<div class="" id="LC251" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">dbg</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Buffering..."</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC252" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px">dataBuffer</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">dataBuffer</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span><span class="" style="margin:0px;padding:0px;border:0px">data</span></div>

<div class="" id="LC253" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px">data</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">stream</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">read</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">8192</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC254" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC255" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

                <span class="" style="margin:0px;padding:0px;border:0px">load_subtitles_in_the_archive</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">dataBuffer</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">language</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC256" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC257" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

        <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">--vlc.msg.dbg("Subtitle data: "..dataBuffer)</span></div><div class="" id="LC258" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC259" style="margin:0px;padding:0px 0px 0px 10px;border:0px">      <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">true</span></div>

<div class="" id="LC260" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC261" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC262" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">function</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,0,0);font-weight:bold">click_load_from_search_button</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC263" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">dbg</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Clicked load button from </span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">\"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Download subtitles</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">\"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)"> dialog"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC264" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">not</span> <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">input</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">is_playing</span><span class="" style="margin:0px;padding:0px;border:0px">())</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC265" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">warn</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">You cannot load subtitles if you aren't playing any file"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC266" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">true</span></div>

<div class="" id="LC267" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC268" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

        <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">old_button_name</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">load_button</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">get_text</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC269" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">load_button</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">set_text</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Wait..."</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC270" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">dlg</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">update</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC271" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC272" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">selection</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">subtitles_list</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">get_selection</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC273" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">index</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">name</span></div>

<div class="" id="LC274" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC275" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">for</span> <span class="" style="margin:0px;padding:0px;border:0px">index</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">name</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">in</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">pairs</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">selection</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">do</span></div>

<div class="" id="LC276" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">dbg</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Selected the item "</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span><span class="" style="margin:0px;padding:0px;border:0px">index</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)"> with the name: "</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span><span class="" style="margin:0px;padding:0px;border:0px">name</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC277" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">dbg</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">URL: "</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span><span class="" style="margin:0px;padding:0px;border:0px">subtitles_result</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px">index</span><span class="" style="margin:0px;padding:0px;border:0px">].</span><span class="" style="margin:0px;padding:0px;border:0px">url</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC278" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC279" style="margin:0px;padding:0px 0px 0px 10px;border:0px">          <span class="" style="margin:0px;padding:0px;border:0px">parse_archive</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">subtitles_result</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px">index</span><span class="" style="margin:0px;padding:0px;border:0px">].</span><span class="" style="margin:0px;padding:0px;border:0px">url</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">subtitles_result</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px">index</span><span class="" style="margin:0px;padding:0px;border:0px">].</span><span class="" style="margin:0px;padding:0px;border:0px">language</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- ZIP, RAR or unknown file</span></div>

<div class="" id="LC280" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC281" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC282" style="margin:0px;padding:0px 0px 0px 10px;border:0px">      <span class="" style="margin:0px;padding:0px;border:0px">load_button</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">set_text</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">old_button_name</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC283" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">dlg</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">update</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC284" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">true</span></div>

<div class="" id="LC285" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC286" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC287" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">function</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,0,0);font-weight:bold">load_first_result</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC288" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">dbg</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Loading first result"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC289" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">not</span> <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">input</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">is_playing</span><span class="" style="margin:0px;padding:0px;border:0px">())</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC290" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">warn</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">You cannot load subtitles if you aren't playing any file"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC291" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">true</span></div>

<div class="" id="LC292" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC293" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC294" style="margin:0px;padding:0px 0px 0px 10px;border:0px">      <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">old_button_name</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">load_button</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">get_text</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC295" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">load_button</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">set_text</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Wait..."</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC296" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">dlg</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">update</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC297" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC298" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px">parse_archive</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">subtitles_result</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">].</span><span class="" style="margin:0px;padding:0px;border:0px">url</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">subtitles_result</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">].</span><span class="" style="margin:0px;padding:0px;border:0px">language</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC299" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC300" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px">load_button</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">set_text</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">old_button_name</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC301" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">dlg</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">update</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC302" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">true</span></div>

<div class="" id="LC303" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC304" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC305" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">function</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,0,0);font-weight:bold">click_load_from_url_button</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC306" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">dbg</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Clicked load button in </span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">\"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Load subtitles from url...</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">\"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)"> dialog"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC307" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">not</span> <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">input</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">is_playing</span><span class="" style="margin:0px;padding:0px;border:0px">())</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC308" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">warn</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">You cannot load subtitles if you aren't playing any file"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC309" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">true</span></div>

<div class="" id="LC310" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC311" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

        <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">old_button_name</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">load_button</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">get_text</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC312" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">load_button</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">set_text</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Wait..."</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC313" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">type_text_input</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">set_text</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC314" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">dlg</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">update</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC315" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC316" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">url_to_load</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">main_text_input</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">get_text</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC317" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">url_to_load</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">false</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div>

<div class="" id="LC318" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">dbg</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">URL: "</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span><span class="" style="margin:0px;padding:0px;border:0px">url_to_load</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC319" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC320" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">_</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">ext_pos</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">extension</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">url_to_load</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">find</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">%.(%a%a%a?)"</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">4</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC321" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC322" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">ext_pos</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px">url_to_load</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">len</span><span class="" style="margin:0px;padding:0px;border:0px">())</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC323" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">type_text_input</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">set_text</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">extension</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC324" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">extension</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">ass"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">or</span> <span class="" style="margin:0px;padding:0px;border:0px">extension</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">ssa"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">or</span> <span class="" style="margin:0px;padding:0px;border:0px">extension</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">srt"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">or</span> <span class="" style="margin:0px;padding:0px;border:0px">extension</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">smi"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">or</span> <span class="" style="margin:0px;padding:0px;border:0px">extension</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">sub"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">or</span> <span class="" style="margin:0px;padding:0px;border:0px">extension</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">rt"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">or</span> <span class="" style="margin:0px;padding:0px;border:0px">extension</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">txt"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">or</span> <span class="" style="margin:0px;padding:0px;border:0px">extension</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">mpl"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC325" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px">load_button</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">set_text</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">old_button_name</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC326" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px">dlg</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">update</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC327" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">input</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">add_subtitle</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">url_to_load</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC328" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC329" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

        <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC330" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC331" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

        <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">result</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">parse_archive</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">url_to_load</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC332" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">not</span> <span class="" style="margin:0px;padding:0px;border:0px">result</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC333" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">info</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Waiting 5 seconds before retry..."</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC334" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">result</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">parse_archive</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">url_to_load</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC335" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC336" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC337" style="margin:0px;padding:0px 0px 0px 10px;border:0px">      <span class="" style="margin:0px;padding:0px;border:0px">load_button</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">set_text</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">old_button_name</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC338" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">dlg</span><span class="" style="margin:0px;padding:0px;border:0px">:</span><span class="" style="margin:0px;padding:0px;border:0px">update</span><span class="" style="margin:0px;padding:0px;border:0px">()</span></div>

<div class="" id="LC339" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px">result</span></div>

<div class="" id="LC340" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC341" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC342" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC343" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC344" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- XML Parsing</span></div><div class="" id="LC345" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">function</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,0,0);font-weight:bold">parseargs</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">s</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC346" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">arg</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">{}</span></div>

<div class="" id="LC347" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">string.gsub</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">s</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">(%w+)=([</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">\"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">'])(.-)%2"</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">function</span> <span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">w</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">_</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">a</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC348" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">arg</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px">w</span><span class="" style="margin:0px;padding:0px;border:0px">]</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">a</span></div>

<div class="" id="LC349" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC350" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px">arg</span></div>

<div class="" id="LC351" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC352" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC353" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">function</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,0,0);font-weight:bold">collect</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">s</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC354" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">stack</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">{}</span></div>

<div class="" id="LC355" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">top</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">{}</span></div>

<div class="" id="LC356" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">table.insert</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">stack</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">top</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC357" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">ni</span><span class="" style="margin:0px;padding:0px;border:0px">,</span><span class="" style="margin:0px;padding:0px;border:0px">c</span><span class="" style="margin:0px;padding:0px;border:0px">,</span><span class="" style="margin:0px;padding:0px;border:0px">label</span><span class="" style="margin:0px;padding:0px;border:0px">,</span><span class="" style="margin:0px;padding:0px;border:0px">xarg</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">empty</span></div>

<div class="" id="LC358" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">i</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">j</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span></div>

<div class="" id="LC359" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">while</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">true</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">do</span></div>

<div class="" id="LC360" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">ni</span><span class="" style="margin:0px;padding:0px;border:0px">,</span><span class="" style="margin:0px;padding:0px;border:0px">j</span><span class="" style="margin:0px;padding:0px;border:0px">,</span><span class="" style="margin:0px;padding:0px;border:0px">c</span><span class="" style="margin:0px;padding:0px;border:0px">,</span><span class="" style="margin:0px;padding:0px;border:0px">label</span><span class="" style="margin:0px;padding:0px;border:0px">,</span><span class="" style="margin:0px;padding:0px;border:0px">xarg</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">empty</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">string.find</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">s</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)"><(%/?)([%w:]+)(.-)(%/?)>"</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">i</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC361" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">not</span> <span class="" style="margin:0px;padding:0px;border:0px">ni</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">break</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div>

<div class="" id="LC362" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">text</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">string.sub</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">s</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">i</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">ni</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC363" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">not</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">string.find</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">text</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">^%s*$"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC364" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">table.insert</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">top</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">text</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC365" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC366" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

                <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">empty</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">/"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- empty element tag</span></div>

<div class="" id="LC367" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">table.insert</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">top</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">{</span><span class="" style="margin:0px;padding:0px;border:0px">label</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span><span class="" style="margin:0px;padding:0px;border:0px">label</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">xarg</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span><span class="" style="margin:0px;padding:0px;border:0px">parseargs</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">xarg</span><span class="" style="margin:0px;padding:0px;border:0px">),</span> <span class="" style="margin:0px;padding:0px;border:0px">empty</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">})</span></div>

<div class="" id="LC368" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">elseif</span> <span class="" style="margin:0px;padding:0px;border:0px">c</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- start tag</span></div>

<div class="" id="LC369" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px">top</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">{</span><span class="" style="margin:0px;padding:0px;border:0px">label</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span><span class="" style="margin:0px;padding:0px;border:0px">label</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">xarg</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span><span class="" style="margin:0px;padding:0px;border:0px">parseargs</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">xarg</span><span class="" style="margin:0px;padding:0px;border:0px">)}</span></div>

<div class="" id="LC370" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">table.insert</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">stack</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">top</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- new level</span></div>

<div class="" id="LC371" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">else</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- end tag</span></div>

<div class="" id="LC372" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">toclose</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">table.remove</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">stack</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- remove top</span></div>

<div class="" id="LC373" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px">top</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">stack</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">#</span><span class="" style="margin:0px;padding:0px;border:0px">stack</span><span class="" style="margin:0px;padding:0px;border:0px">]</span></div>

<div class="" id="LC374" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">#</span><span class="" style="margin:0px;padding:0px;border:0px">stack</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold"><</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC375" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                            <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">error</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">nothing to close with "</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span><span class="" style="margin:0px;padding:0px;border:0px">label</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC376" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC377" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

                        <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">toclose</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">label</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">~=</span> <span class="" style="margin:0px;padding:0px;border:0px">label</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC378" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                            <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">error</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">trying to close "</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span><span class="" style="margin:0px;padding:0px;border:0px">toclose</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">label</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)"> with "</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span><span class="" style="margin:0px;padding:0px;border:0px">label</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC379" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC380" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

                        <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">table.insert</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">top</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">toclose</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC381" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC382" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

                <span class="" style="margin:0px;padding:0px;border:0px">i</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">j</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">+</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span></div>

<div class="" id="LC383" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC384" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

        <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">text</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">string.sub</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">s</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">i</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC385" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">not</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">string.find</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">text</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">^%s*$"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC386" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">table.insert</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">stack</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">#</span><span class="" style="margin:0px;padding:0px;border:0px">stack</span><span class="" style="margin:0px;padding:0px;border:0px">],</span> <span class="" style="margin:0px;padding:0px;border:0px">text</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC387" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC388" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

        <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">#</span><span class="" style="margin:0px;padding:0px;border:0px">stack</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">></span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC389" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">error</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">unclosed "</span><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span><span class="" style="margin:0px;padding:0px;border:0px">stack</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px">stack</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">n</span><span class="" style="margin:0px;padding:0px;border:0px">].</span><span class="" style="margin:0px;padding:0px;border:0px">label</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC390" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC391" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

        <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px">stack</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">]</span></div>

<div class="" id="LC392" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC393" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC394" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">function</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,0,0);font-weight:bold">urlOpenSub</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">search_term</span><span class="" style="margin:0px;padding:0px;border:0px">,</span><span class="" style="margin:0px;padding:0px;border:0px">lang</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC395" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- base = "<a href="http://api.opensubtitles.org/en/search/">http://api.opensubtitles.org/en/search/</a>"</span></div>

<div class="" id="LC396" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">search_term</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">string.gsub</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">search_term</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">%%"</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">%%37"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC397" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">search_term</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">string.gsub</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">search_term</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)"> "</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">%%20"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC398" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)"><a href="http://kafol.net/code/subtitles/search.php?s=">http://kafol.net/code/subtitles/search.php?s=</a>"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span> <span class="" style="margin:0px;padding:0px;border:0px">search_term</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">&l="</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span> <span class="" style="margin:0px;padding:0px;border:0px">lang</span></div>

<div class="" id="LC399" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- return base .. "moviename-" .. search_term .. "/simplexml"</span></div>

<div class="" id="LC400" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- <a href="http://api.opensubtitles.org/en/search/moviename-">http://api.opensubtitles.org/en/search/moviename-</a> .. search_term .. /simplexml</span></div>

<div class="" id="LC401" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC402" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC403" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">function</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,0,0);font-weight:bold">parseOpenSub</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">xmltext</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC404" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">dbg</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Parsing XML data..."</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC405" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">xmltext</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">string.gsub</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">xmltext</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)"><%?xml version=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">\"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">1%.0</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">\"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)"> encoding=</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">\"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">utf-8</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">\"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">%?>"</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC406" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">xmldata</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">collect</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">xmltext</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC407" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">for</span> <span class="" style="margin:0px;padding:0px;border:0px">a</span><span class="" style="margin:0px;padding:0px;border:0px">,</span><span class="" style="margin:0px;padding:0px;border:0px">b</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">in</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">pairs</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">xmldata</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">do</span></div>

<div class="" id="LC408" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">type</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">b</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">table"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC409" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">b</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">label</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">search"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC410" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                            <span class="" style="margin:0px;padding:0px;border:0px">xmldata</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">b</span></div>

<div class="" id="LC411" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">break</span></div><div class="" id="LC412" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

                        <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC413" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div>

<div class="" id="LC414" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC415" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC416" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC417" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">xmldata</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div>

<div class="" id="LC418" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC419" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- Subtitles information data</span></div>

<div class="" id="LC420" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">subname</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">{}</span></div>

<div class="" id="LC421" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">sub_movie</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">{}</span></div>

<div class="" id="LC422" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">suburl</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">{}</span></div>

<div class="" id="LC423" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">sublang</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">{}</span></div>

<div class="" id="LC424" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">sub_language</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">{}</span></div>

<div class="" id="LC425" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">subformat</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">{}</span></div>

<div class="" id="LC426" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">subfilenum</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">{}</span></div>

<div class="" id="LC427" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">subnum</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span></div>

<div class="" id="LC428" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">local</span> <span class="" style="margin:0px;padding:0px;border:0px">baseurl</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span></div>

<div class="" id="LC429" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC430" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- Let's browse iteratively the 'xmldata' tree</span></div>

<div class="" id="LC431" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- OK, the variables' names aren't explicit enough, but just remember a couple</span></div>

<div class="" id="LC432" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- a,b contains the index (a) and the data (b) of the table, which might also be a table</span></div>

<div class="" id="LC433" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">for</span> <span class="" style="margin:0px;padding:0px;border:0px">a</span><span class="" style="margin:0px;padding:0px;border:0px">,</span><span class="" style="margin:0px;padding:0px;border:0px">b</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">in</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">pairs</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">xmldata</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">do</span></div>

<div class="" id="LC434" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">type</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">b</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">table"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC435" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">b</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">label</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">results"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC436" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">for</span> <span class="" style="margin:0px;padding:0px;border:0px">c</span><span class="" style="margin:0px;padding:0px;border:0px">,</span><span class="" style="margin:0px;padding:0px;border:0px">d</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">in</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">pairs</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">b</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">do</span></div>

<div class="" id="LC437" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">type</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">d</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">table"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC438" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">d</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">label</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">subtitle"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC439" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                                    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">for</span> <span class="" style="margin:0px;padding:0px;border:0px">e</span><span class="" style="margin:0px;padding:0px;border:0px">,</span><span class="" style="margin:0px;padding:0px;border:0px">f</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">in</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">pairs</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">d</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">do</span></div>

<div class="" id="LC440" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                                            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">type</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">f</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">table"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC441" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                                                    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">f</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">label</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">releasename"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC442" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                                                            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">f</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">]</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">~=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span> <span class="" style="margin:0px;padding:0px;border:0px">subname</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px">subnum</span><span class="" style="margin:0px;padding:0px;border:0px">]</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">f</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">]</span></div>

<div class="" id="LC443" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                                                            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">else</span> <span class="" style="margin:0px;padding:0px;border:0px">subname</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px">subnum</span><span class="" style="margin:0px;padding:0px;border:0px">]</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div>

<div class="" id="LC444" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                                                    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">elseif</span> <span class="" style="margin:0px;padding:0px;border:0px">f</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">label</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">movie"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC445" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                                                            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">f</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">]</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">~=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span> <span class="" style="margin:0px;padding:0px;border:0px">sub_movie</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px">subnum</span><span class="" style="margin:0px;padding:0px;border:0px">]</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">f</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">]</span></div>

<div class="" id="LC446" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                                                            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">else</span> <span class="" style="margin:0px;padding:0px;border:0px">sub_movie</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px">subnum</span><span class="" style="margin:0px;padding:0px;border:0px">]</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div>

<div class="" id="LC447" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                                                    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">elseif</span> <span class="" style="margin:0px;padding:0px;border:0px">f</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">label</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">download"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC448" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                                                            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">f</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">]</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">~=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span> <span class="" style="margin:0px;padding:0px;border:0px">suburl</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px">subnum</span><span class="" style="margin:0px;padding:0px;border:0px">]</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">f</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">]</span></div>

<div class="" id="LC449" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                                                            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">else</span> <span class="" style="margin:0px;padding:0px;border:0px">suburl</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px">subnum</span><span class="" style="margin:0px;padding:0px;border:0px">]</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div>

<div class="" id="LC450" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                                                    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">elseif</span> <span class="" style="margin:0px;padding:0px;border:0px">f</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">label</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">iso639"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span>  <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- two letter language code</span></div>

<div class="" id="LC451" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                                                            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">f</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">]</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">~=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span> <span class="" style="margin:0px;padding:0px;border:0px">sublang</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px">subnum</span><span class="" style="margin:0px;padding:0px;border:0px">]</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">f</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">]</span></div>

<div class="" id="LC452" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                                                            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">else</span> <span class="" style="margin:0px;padding:0px;border:0px">sublang</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px">subnum</span><span class="" style="margin:0px;padding:0px;border:0px">]</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div>

<div class="" id="LC453" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                                                    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">elseif</span> <span class="" style="margin:0px;padding:0px;border:0px">f</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">label</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">language"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC454" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                                                            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">f</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">]</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">~=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span> <span class="" style="margin:0px;padding:0px;border:0px">sub_language</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px">subnum</span><span class="" style="margin:0px;padding:0px;border:0px">]</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">f</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">]</span></div>

<div class="" id="LC455" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                                                            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">else</span> <span class="" style="margin:0px;padding:0px;border:0px">sub_language</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px">subnum</span><span class="" style="margin:0px;padding:0px;border:0px">]</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div>

<div class="" id="LC456" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                                                    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">elseif</span> <span class="" style="margin:0px;padding:0px;border:0px">f</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">label</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">format"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC457" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                                                            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">f</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">]</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">~=</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span> <span class="" style="margin:0px;padding:0px;border:0px">subformat</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px">subnum</span><span class="" style="margin:0px;padding:0px;border:0px">]</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">f</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">]</span></div>

<div class="" id="LC458" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                                                            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">else</span> <span class="" style="margin:0px;padding:0px;border:0px">subformat</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px">subnum</span><span class="" style="margin:0px;padding:0px;border:0px">]</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div>

<div class="" id="LC459" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                                                    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC460" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

                                                                <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC461" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                                    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div>

<div class="" id="LC462" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                                    <span class="" style="margin:0px;padding:0px;border:0px">subnum</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">subnum</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">+</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span></div>

<div class="" id="LC463" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                                            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC464" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

                                        <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC465" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div>

<div class="" id="LC466" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">elseif</span> <span class="" style="margin:0px;padding:0px;border:0px">b</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">label</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">base"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC467" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                            <span class="" style="margin:0px;padding:0px;border:0px">baseurl</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">b</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">]</span></div>

<div class="" id="LC468" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC469" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

                <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC470" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div>

<div class="" id="LC471" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC472" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">subnum</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold"><=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC473" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">nil</span></div>

<div class="" id="LC474" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC475" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC476" style="margin:0px;padding:0px 0px 0px 10px;border:0px">      <span class="" style="margin:0px;padding:0px;border:0px">ret</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">{}</span></div>

<div class="" id="LC477" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC478" style="margin:0px;padding:0px 0px 0px 10px;border:0px">  <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">for</span> <span class="" style="margin:0px;padding:0px;border:0px">i</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">,(</span><span class="" style="margin:0px;padding:0px;border:0px">subnum</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">-</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,153,153)">1</span><span class="" style="margin:0px;padding:0px;border:0px">)</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">do</span></div>

<div class="" id="LC479" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">fullURL</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">suburl</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px">i</span><span class="" style="margin:0px;padding:0px;border:0px">]</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- baseurl .. "/" .. suburl[i]</span></div>

<div class="" id="LC480" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">realName</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">string.gsub</span><span class="" style="margin:0px;padding:0px;border:0px">(</span> <span class="" style="margin:0px;padding:0px;border:0px">subname</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px">i</span><span class="" style="margin:0px;padding:0px;border:0px">],</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)"><..CDATA."</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span> <span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC481" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">realName</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">string.gsub</span><span class="" style="margin:0px;padding:0px;border:0px">(</span> <span class="" style="margin:0px;padding:0px;border:0px">realName</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">..>"</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span> <span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC482" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">if</span> <span class="" style="margin:0px;padding:0px;border:0px">realName</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">==</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">then</span></div>

<div class="" id="LC483" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px">realName</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">string.gsub</span><span class="" style="margin:0px;padding:0px;border:0px">(</span> <span class="" style="margin:0px;padding:0px;border:0px">sub_movie</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px">i</span><span class="" style="margin:0px;padding:0px;border:0px">],</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)"><..CDATA."</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span> <span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC484" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                    <span class="" style="margin:0px;padding:0px;border:0px">realName</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(0,134,179)">string.gsub</span><span class="" style="margin:0px;padding:0px;border:0px">(</span> <span class="" style="margin:0px;padding:0px;border:0px">realName</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">..>"</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span> <span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC485" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC486" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC487" style="margin:0px;padding:0px 0px 0px 10px;border:0px">              <span class="" style="margin:0px;padding:0px;border:0px">ret</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px">i</span><span class="" style="margin:0px;padding:0px;border:0px">]</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">{</span> <span class="" style="margin:0px;padding:0px;border:0px">name</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">realName</span><span class="" style="margin:0px;padding:0px;border:0px">,</span></div>

<div class="" id="LC488" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                       <span class="" style="margin:0px;padding:0px;border:0px">url</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">fullURL</span><span class="" style="margin:0px;padding:0px;border:0px">,</span></div>

<div class="" id="LC489" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                       <span class="" style="margin:0px;padding:0px;border:0px">language</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">sublang</span><span class="" style="margin:0px;padding:0px;border:0px">[</span><span class="" style="margin:0px;padding:0px;border:0px">i</span><span class="" style="margin:0px;padding:0px;border:0px">],</span></div>

<div class="" id="LC490" style="margin:0px;padding:0px 0px 0px 10px;border:0px">                       <span class="" style="margin:0px;padding:0px;border:0px">extension</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">.zip"</span> </div>

<div class="" id="LC491" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">}</span></div><div class="" id="LC492" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC493" style="margin:0px;padding:0px 0px 0px 10px;border:0px">              <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">dbg</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Found subtitle "</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span> <span class="" style="margin:0px;padding:0px;border:0px">i</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">..</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">: "</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC494" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">dbg</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">realName</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC495" style="margin:0px;padding:0px 0px 0px 10px;border:0px">            <span class="" style="margin:0px;padding:0px;border:0px">vlc</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">msg</span><span class="" style="margin:0px;padding:0px;border:0px">.</span><span class="" style="margin:0px;padding:0px;border:0px">dbg</span><span class="" style="margin:0px;padding:0px;border:0px">(</span><span class="" style="margin:0px;padding:0px;border:0px">fullURL</span><span class="" style="margin:0px;padding:0px;border:0px">)</span></div>

<div class="" id="LC496" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC497" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC498" style="margin:0px;padding:0px 0px 0px 10px;border:0px">      <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">return</span> <span class="" style="margin:0px;padding:0px;border:0px">ret</span></div>

<div class="" id="LC499" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">end</span></div><div class="" id="LC500" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<br></div><div class="" id="LC501" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- These tables must be after all function definitions</span></div>

<div class="" id="LC502" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px">websites</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">{</span></div>

<div class="" id="LC503" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">{</span> <span class="" style="margin:0px;padding:0px;border:0px">title</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Kafol.net"</span><span class="" style="margin:0px;padding:0px;border:0px">,</span></div>

<div class="" id="LC504" style="margin:0px;padding:0px 0px 0px 10px;border:0px">      <span class="" style="margin:0px;padding:0px;border:0px">urlfunc</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">urlOpenSub</span><span class="" style="margin:0px;padding:0px;border:0px">,</span></div>

<div class="" id="LC505" style="margin:0px;padding:0px 0px 0px 10px;border:0px">      <span class="" style="margin:0px;padding:0px;border:0px">parsefunc</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">parseOpenSub</span> <span class="" style="margin:0px;padding:0px;border:0px">}</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">--[[;</span></div>

<div class="" id="LC506" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">        { title = "Fake (OS)",</span></div>

<div class="" id="LC507" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">          urlfunc = url2,</span></div><div class="" id="LC508" style="margin:0px;padding:0px 0px 0px 10px;border:0px">

<span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">      parsefunc = parse2 }]]</span></div><div class="" id="LC509" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px">}</span></div>

<div class="" id="LC510" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><br></div><div class="" id="LC511" style="margin:0px;padding:0px 0px 0px 10px;border:0px"><span class="" style="margin:0px;padding:0px;border:0px">languages</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px">{</span></div>

<div class="" id="LC512" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">{</span> <span class="" style="margin:0px;padding:0px;border:0px">title</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">English"</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">tag</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">en"</span> <span class="" style="margin:0px;padding:0px;border:0px">},</span></div>

<div class="" id="LC513" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(153,153,136);font-style:italic">-- { title = "All", tag = "all" },</span></div>

<div class="" id="LC514" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">{</span> <span class="" style="margin:0px;padding:0px;border:0px">title</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">Slovenian"</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">tag</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">sl"</span> <span class="" style="margin:0px;padding:0px;border:0px">},</span></div>

<div class="" id="LC515" style="margin:0px;padding:0px 0px 0px 10px;border:0px">    <span class="" style="margin:0px;padding:0px;border:0px">{</span> <span class="" style="margin:0px;padding:0px;border:0px">title</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">French"</span><span class="" style="margin:0px;padding:0px;border:0px">,</span> <span class="" style="margin:0px;padding:0px;border:0px">tag</span> <span class="" style="margin:0px;padding:0px;border:0px;font-weight:bold">=</span> <span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">"</span><span class="" style="margin:0px;padding:0px;border:0px;color:rgb(221,17,68)">fr"</span> <span class="" style="margin:0px;padding:0px;border:0px">}</span></div>

</pre></div>