PRX/PRX.org-Frontend — pull request #73 by chrisrhoden (2014-05-20 15:38:18+00:00)
Title: Radio Mode! Keep the party going.

I think I am headed in a direction that more tightly couples
the responsibilities of "playability" to the models rather than
extracting that to the player module, though actually I think it will
look pretty similar, just be written with a slightly different feeling.

There are a couple of other fixes in here, and I am not in love with the
back and forth communication between the story and account modules - the
story asks the account to generate a playlist, which also requires the
account to know about stories. It seems like it's just a reality of our
data model (these two are particularly difficult to imagine not touching
everything) but if there's another way you can imagine to accomplish this
I am all ears.

I am once again lazily loading things (different things!), but with (I think)
very good reasons here - specifically, we can't be sure that we have audio file
urls already and so we need to be fairly sure that we even want to make that
API call. Unlike before, I am not trying to check to see if I already have data
(meaning that I load the data when I need it, and if I don't need it then I don't
care whether it is there or not) which hopefully makes this less of a pain to
reason about.

Also, promises! Man, are they ever great.

I fully expect lots of this code to need massaging but I feel like it's stable enough for production now.