local AddHotKeys=1 
------------------------------------------------------------------------------------------------
m_simpleTV.Defines.ID_YTV_LOGIN				=	m_simpleTV.Defines.ID_EXT_YTV_START_MAIN_CONFIG + 1
m_simpleTV.Defines.ID_YTV_PASS				=	m_simpleTV.Defines.ID_EXT_YTV_START_MAIN_CONFIG + 2
m_simpleTV.Defines.ID_YTV_UPDATEPLSONSTART	=	m_simpleTV.Defines.ID_EXT_YTV_START_MAIN_CONFIG + 3
m_simpleTV.Defines.ID_YTV_UPDATEPLSONREFRESH	= m_simpleTV.Defines.ID_EXT_YTV_START_MAIN_CONFIG + 4
m_simpleTV.Defines.ID_YTV_DELETEBEFORELOAD =	m_simpleTV.Defines.ID_EXT_YTV_START_MAIN_CONFIG + 5
m_simpleTV.Defines.ID_EXT_YTV_NOTADDMENU =	m_simpleTV.Defines.ID_EXT_YTV_START_MAIN_CONFIG + 6

local providerName = 'Viet-Simpletv'
local providerPath = m_simpleTV.MainScriptDir .. 'user\\' .. providerName .. '\\'

--AddFileToExecute('getaddress', providerPath .. 'getaddress.lua')
AddFileToExecute('onconfig', providerPath .. 'initconfig.lua')
m_simpleTV.Interface.AddExtMenu('Update TV channels', 'user\\' .. providerName .. '\\updateplaylist.lua',string.byte('V'),3)
if AddHotKeys==1 then
local value=m_simpleTV.Config.GetConfigInt(m_simpleTV.Defines.ID_EXT_YTV_NOTADDMENU)
  if value~=1 then
m_simpleTV.Interface.AddExtMenu('Update TV18+ channels', 'user\\' .. providerName .. '\\updateplaylist1.lua',string.byte('X'),3)
end 
end
local value = m_simpleTV.Config.GetConfigInt(m_simpleTV.Defines.ID_YTV_UPDATEPLSONREFRESH)
if value == 1 then
	AddFileToExecute('refreshplst', providerPath .. 'Refreshplaylist.lua')
                m_simpleTV.Interface.AddExtMenu('Refresh channel list', 'user\\' .. providerName .. '\\Refreshplaylist.lua',string.byte('R'),3)
end

value = m_simpleTV.Config.GetConfigInt(m_simpleTV.Defines.ID_YTV_UPDATEPLSONSTART)
if value == 1 then
	dofile(providerPath .. 'updateplaylist.lua')
end

value = m_simpleTV.Config.GetConfigInt(m_simpleTV.Defines.ID_YTV_DELETEBEFORELOAD)
if value == 1 then
	dofile(providerPath .. 'Refreshplaylist.lua')
end