--autoupdate at start up
-- 1 - yes 0 - no

 local fhandle = io.open (m_simpleTV.MainScriptDir .. "user/tvplaylists/tvmenu.ini")
 if fhandle == nil then return end
 local value = fhandle:read('*a')
 fhandle:close()

local ttv = value:match('UpdateAtStartTTV=(%d);')
if ttv == nil then ttv = 0 end
local lamp = value:match('UpdateAtStartLamp=(%d);')
if lamp == nil then lamp = 0 end

if lamp=='1' then	 
    m_simpleTV.OSD.ShowMessage("Lamp - start updating" ,0xFF00,5)
    dofile(m_simpleTV.MainScriptDir .. 'user/tvplaylists/lamp/lamp.lua')  
end
if ttv=='1' then	 
    m_simpleTV.OSD.ShowMessage("TTV - start updating" ,0xFF00,5)
    dofile(m_simpleTV.MainScriptDir .. 'user/tvplaylists/ttv/ttv.lua')  
end