playdar-core
playdar-core copied to clipboard
accept 'expires' field in results
Sometimes a stream may only be valid for a set amount of time. Playdar should accept an expires value in results from resolvers and not use the result if the time has elapsed.
A real world example?
The Napster API returns HTTP URLs to stream that expire after 1 hour. If you queued up >1 hr of songs then some URLs might stop working
As a concrete example, a resolver could return something like: { 'artist': "Mokele", 'track' : "Hiding In Your Insides (python)", 'album' : "You Yourself are Me Myself and I am in Love", 'url' : "http://play.mokele.co.uk/music/Hiding%20In%20Your%20Insides.mp3", 'expires' : 60, #minutes 'etc....' }