playdar-core icon indicating copy to clipboard operation
playdar-core copied to clipboard

accept 'expires' field in results

Open alastair opened this issue 15 years ago • 3 comments

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.

alastair avatar Dec 10 '09 21:12 alastair

A real world example?

jwheare avatar Dec 11 '09 00:12 jwheare

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

alastair avatar Dec 11 '09 02:12 alastair

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....' }

alastair avatar Dec 11 '09 02:12 alastair