freerange/jam-coop

RSS feeds!

Closed this issue · 3 comments

For /artists and /artists/:id at least. Old school. Federated. etc.

@chrislo I just had a quick go at these, but we need to decide how to determine the release/publication date of albums which do not have Album#released_at set. Entries in a feed need a fixed non-null publication timestamp.

In #42 you said:

For albums that have only been released on jam, perhaps we'd need a "published at" timestamp that we could use instead.

There's a small number of albums currently in the jam production database that we can fix up manually.

I think the number of albums is larger now and seemingly getting bigger by the day (🚀), so perhaps it's time to address this...?

How about we set a new Album#first_published_at timestamp which gets set in Album#publish and use that if no Album#released_at is set...? What do you think...? I think we need Album#first_published_at vs Album#published_at, because its theoretically possible to un-publish and then re-publish an album.

I'm not sure how easy it will be to backfill values for Album#first_published_at - the best idea I've come up with is to set it to the later of Album#updated_at and the latest value of Track#updated (for any of its tracks) for any albums that are in the published state. What do you think...?

I think that sounds great! Artists have the option to correct/override the release date if what we guess isn't correct, so that sounds good.

@chrislo I'm going with Atom (rather than RSS) feeds, because I don't really know what the state of the art is, but Rails has a built-in helper for Atom feeds and that's what we have on gofreerange.com!