Page 1 of 1

How to get info from an Ogg file?

Posted: 19 Nov 2016, 05:13
by Forboding Angel
Specifically I want to get title and artist. I have found some random sparse info on where others have tried to do it, but doesn't work. I know that smoth at one point had a music widget that did it.

Info also doesn't seem to be in the wiki.

Code: Select all

	-- for key, val in pairs(oggInfo) do
		-- Spring.Echo(key, val)
	-- end


	-- if (oggInfo.comments.TITLE and oggInfo.comments.TITLE) then
		-- Spring.Echo("Song changed to: " .. oggInfo.comments.TITLE .. " By: " .. oggInfo.comments.ARTIST)
	-- else
		-- Spring.Echo("Song changed but unable to get the artist and title info")
	-- end
Here is the code block I found where someone was trying to do it.

Re: How to get info from an Ogg file?

Posted: 19 Nov 2016, 05:30
by hokomoko
I don't think a way exists at the moment

Re: How to get info from an Ogg file?

Posted: 19 Nov 2016, 07:40
by Silentwings
Use filenames in "Artist - Title" form instead.

Re: How to get info from an Ogg file?

Posted: 19 Nov 2016, 12:55
by Forboding Angel
Thanks guys :-)

Re: How to get info from an Ogg file?

Posted: 19 Nov 2016, 21:53
by smoth
Forb, that code still works on my end

edit

yep, still works, maybe it is an issue with your ogg info somehow being malformed, care to email them to me or a link to them?

Re: How to get info from an Ogg file?

Posted: 20 Nov 2016, 06:10
by Forboding Angel
Can you paste your widget so I can see how it's being done?

https://github.com/EvolutionRTS/Evoluti ... _Evo/Music

Image