You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You'd get the links only if you're the driver. The driver gets a dropdown link to select their preferred music service. If Odesli can't find a link for that song on that service, they can just use the regular link like they do now.
I spent a bit of time thinking about how we'd implement this... we don't want to make the requests while rendering the session page, because it would mean one API request per track on the page before the page would even load. We also probably don't want to add columns to the schema to hold the URLs the way we do with album art, because we want to stay flexible on which platforms we support. So, two ideas:
We stick the URLs in the driver's session cookie. The page will load slowly if someone starts driving or switches their preferred platform when there are already a bunch of tracks in the session, and will continue to be slightly slower than non-driver when reloading after cueing a a track (since this API call will happen synchronously while rendering the page post-cue). I'm also not sure how big a session cookie can get in general / before starting to cause problems. lol okay 4kb is not big enough for this approach
We finally get around to doing some ajax calls and stick the preferred platform links back in the DOM after the initial page load. To speed this up / cut back on eating up our rate limit with Odesli, we could combine this with the first approach set up server-side caching. This is likely to feel faster for the user (since the page renders and loads quickly) even if it takes the same amount of time for the links to show up. Figuring this out would also be useful for Fill in title and author automatically in new track form after URL is filled in #7 and other natural-feeling UX.
Perhaps we should only look the URLs up once per track, so this should happen… when a track's saved? But that'd make that slower too. It'd be cool if you could dispatch the Odesli lookup from Python asynchronously.
Like:
You'd get the links only if you're the driver. The driver gets a dropdown link to select their preferred music service. If Odesli can't find a link for that song on that service, they can just use the regular link like they do now.
Here's the Odesli API docs:
https://github.com/songlink/docs/blob/master/api-v1-alpha.1.mdhttps://www.notion.so/odesli/Public-API-d8093b1bb8874f8b85527d985c4f9e68The text was updated successfully, but these errors were encountered: