alaingilbert / Turntable-API

Allows you to create bots for turntable.fm
http://alaingilbert.github.com/Turntable-API/
MIT License
317 stars 97 forks source link

Any way to get the starttime in the songlog? #124

Closed ehedaya closed 11 years ago

ehedaya commented 11 years ago

If my bot crashes for whatever reason, and songs are played while he is not in the room, it would be nice to be able to parse the song log to "catch up". But the starttime, which is included with other song events, is missing from the song log. Can this be added?

alaingilbert commented 11 years ago

Nop :( If the startime isn't there, only turntable.fm can add it. So you should ask them.

ehedaya commented 11 years ago

Ah. Bummer. Thanks Alain! I've been using starttime as a primary key of sorts in my database, I guess that was a poor decision on my part.

ehedaya commented 11 years ago

I just thought I would post my workaround for this here. I added a section to the 'registered' listener that gets the starttime for the current track then loops through the subtracts the track length to approximate starttime values for each track missed. Helps me track the songs I missed.

https://github.com/ehedaya/ttstatsbot/blob/master/bot.js#L182