Skip to content

YouTube Playlists

RePod edited this page Jul 2, 2017 · 3 revisions

Will never improve beyond their current support as RTV-formatted playlists.

However, there is good news! Tools are very slowly trickling out to accommodate various users converting YouTube playlists (their own or otherwise) to RTV playlists.

Look here for playlist generation and conversion tools for several methods on how to get a proper playlist and then add it to RTV as a custom channel.


Why do YouTube playlists need to be converted?

There are two primary options:

  • Load the playlist page/HTML with AJAX and parse (100% Client side)

    • ๐Ÿ‘ Simple, in implementation and production.
    • ๐Ÿ‘Ž Instantly shot down by CORS.
    • ๐Ÿ‘Ž Primarily limited to 100 items
      • Unless the remaining AJAX response is also fetched
  • Use the YouTube API (v3) "as intended" (Client side + Developer API key)

    • ๐Ÿ‘ Clean, reliable/consistent.
    • ๐Ÿ‘ No difficulty with playlist lengths, infinite items.
    • ๐Ÿ‘Ž Revolves around a pre-determined, but "generous", quota. (example below)
    • ๐Ÿ‘Ž Very slow due to all the pre-processing before RTV can even begin its processing.

Assume a quota limit of 1,000,000 units, per day, per API key and a playlist with 173 items.

  • First, to fetch a playlist is 1 unit per call.
    • Can only return 50 items ("page") max per call, so 4 calls. (4 units)
    • Including the video IDs is 0 units, each.
    • There's also waiting time between each to wait for it to complete and indicate the next "page" to request.
    • End of this step is 4 units.
  • Strip out all the video IDs into a new playlist.
  • Fetch the per-video information.
    • Can only return 50 items ("page") max per call, so 4 calls. (4 units total)
    • The information we need (duration) is 2 units, per video. (346 units total)
    • End of this step is 350 units.
  • In total, a 173 item playlist would cost approximately 354 of 1 million units.
    • Caching could help reduce repeats, but only so much.

While it's a drop in the bucket, it's an enforced limit I'm not happy with enabling. RTV is intended to be client-side, and while it would still be, would be passing through a "third-party" (my developer API key).

Clone this wiki locally