   
--debug_in_file(m_simpleTV.Control.RealAdress)
if not string.match(m_simpleTV.Control.CurrentAdress, '^http://lb%.ntvplus%.tv/' ) and not string.match(m_simpleTV.Control.RealAdress, '^http://vip') then return end

if m_simpleTV.Control.Reason=='Error'  then  

if string.match(m_simpleTV.Control.RealAdress, '^http://vip') then 
    m_simpleTV.Control.RealAdress = string.gsub(m_simpleTV.Control.RealAdress,'80%.m3u8','70%.m3u8')
    m_simpleTV.Control.CurrentAdress = m_simpleTV.Control.RealAdress
    m_simpleTV.Control.Action = 'repeat'
  return
end

local value = m_simpleTV.Interface.MessageBox('NTV Plus playlist lifetime is over. Update is required!\n Update now?','NTV Plus playlist',1,0)
     if value == 1 then
        dofile(m_simpleTV.MainScriptDir .. "user/tvplaylists/ntv/ntvwebpls.lua") 
     end   
  return
end 

--m_simpleTV.Control.Reason              Error|EndReached|Stopped|Playing|Sleeping|addressready|Timeout
--m_simpleTV.Control.CurrentAdress       Address from database
--m_simpleTV.Control.RealAdress			 Real Address

--output
--m_simpleTV.Control.CurrentAddress      Address from database
--m_simpleTV.Control.Action              dodefault|repeat|stop