Project

General

Profile

Передача метаданных в FM-процессоры SOUND4 » TractMetadataParser.lua

Evgeniia Rachkovskaia, 12/05/2020 16:17

 
-- <nowplaying>
-- <ARTIST><![CDATA['artist']]></ARTIST>
-- <TITLE><![CDATA['title']]></TITLE>
-- </nowplaying>
--
UseXmlParser()

function OnXMLParsed()
local artist=XPath('//nowplaying/ARTIST/text()')
local title=XPath('//nowplaying/TITLE/text()')

local compact_song=artist .. ' - ' .. title
-- Use XML Meta (for stream version >= 2.0.12)
if meta ~= nil then
meta:Add("title", title)
meta:Add("artist", artist)
meta:Add("compact_song", compact_song)
else
-- stream < v1.0.12 compatibility [DEPRECATED]
SendMetaDataSong(compact_song,"")
end
end
(1-1/6)
Add picture from clipboard (Maximum size: 742 MB)