
local function unescape_html(str)
  str = string.gsub( str, '&lt;', '<' )
  str = string.gsub( str, '&gt;', '>' )
  str = string.gsub( str, '&quot;', '"' )
  str = string.gsub( str, '&apos;', "'" )
  str = string.gsub( str, '&#(%d+);', function(n) return string.char(n) end )
  str = string.gsub( str, '&#x(%d+);', function(n) return string.char(tonumber(n,16)) end )
  str = string.gsub( str, '&amp;', '&' ) -- Be sure to do this after all others
  return str
end

if not m_simpleTV.Control.IsVideo() and (m_simpleTV.Control.Reason == 'Playing' and m_simpleTV.Control.Action=='dodefault') then

    m_simpleTV.Control.EventPlayingInterval=1000
    local Station, Track = m_simpleTV.Control.GetMetaInfo(0), m_simpleTV.Control.GetMetaInfo(12) 
     if Station and Track then m_simpleTV.Control.SetTitle( Station .. ' - ' .. Track ) end 
 end

 if m_simpleTV.User.IsMetaInfo and ( m_simpleTV.Control.IsVideo() or m_simpleTV.Control.Reason == 'Stopped' or m_simpleTV.Control.Reason == 'EndReached' ) then
     m_simpleTV.OSD.ShowMessage_UTF8('')
     m_simpleTV.User.IsMetaInfo=false
 end
 