hasgeek.tv icon indicating copy to clipboard operation
hasgeek.tv copied to clipboard

RSS/Atom feeds

Open jace opened this issue 12 years ago • 3 comments

HasGeek TV needs RSS or Atom feeds per channel and per playlist.

  1. The per-playlist version is a list of all videos in the playlist, sorted by playlists_videos.created_at. Don't use updated_at as that will change when the playlist order changes.
  2. The per-channel version is a list of all videos that were originally added to a playlist owned by the channel. The query for this is Video.query.filter(Video.playlist.in_(channel.playlists).order_by('created_at')

I'm uncomfortable using created_at in a user-facing query, but I don't think we have another column with the same data.

You can borrow the Atom feed template and code from Eventframe. See feed.xml and related code

jace avatar Jan 02 '13 06:01 jace

Change of plans:

  1. The per-playlist version uses the playlist's sorting order, in reverse. That is, the last item in the playlist is the first item in the feed.
  2. The per-channel version uses the stream playlist as described in #60, also presented in reverse (most recent first).

jace avatar Jan 08 '13 07:01 jace

The feed should also include attachments for downloading and offline viewing. We need to check on the APIs for all sources to find and include download links in the feed.

If there are multiple download links available (for eg, video at various resolutions), we should pick the best for mobile.

This will require caching the download link in the Video model as querying the API every time the feed is requested is not tenable.

jace avatar Jan 08 '13 14:01 jace

Initial feed support has been added in 6cfecd1. Todo: feed links from the view page.

jace avatar Jan 08 '13 15:01 jace