lucifer: do you know if we have access to a spotify user's region? in working out how to do the inverted index, I'm reminded that tracks may appear in one of more regions, but whether they are available to the user, really depends on their region. so a lookup will need the parameters of: artist, album, track, and region to be a good lookup.
hm, but this isn't exactly clear what we need to do from here, is it?
2022-10-01 27409, 2022
mayhem
is track relinking done automatically on playback?
2022-10-01 27420, 2022
lucifer
>These tracks are linked together so that when a user tries to play a track that isn’t available in their own market, the Spotify mobile, desktop, and web players try to play another instance of the track that is available in the user’s market.
2022-10-01 27430, 2022
lucifer
from this, i assume yes.
2022-10-01 27459, 2022
mayhem
that's the problem with spotify and their APIs. Assuming is no good. nor is trusting. lol.
2022-10-01 27408, 2022
mayhem
well, we'll find out soon enough.
2022-10-01 27411, 2022
lucifer
lol true indeed.
2022-10-01 27416, 2022
mayhem
but then the reverse index is pretty simple.
2022-10-01 27418, 2022
lucifer
yes makes sense
2022-10-01 27443, 2022
mayhem
order by release date, album_type.
2022-10-01 27407, 2022
mayhem
but I still don't really understand how the whole market/region will play out into this.
2022-10-01 27410, 2022
mayhem
I guess the first attempt should just assume that we'll take the first instance of any track and rely on relinking to get us something that the user can play back.
2022-10-01 27411, 2022
lucifer
yeah makes sense. we can build some playlists of tracks that we know differ in availability and us in different regions can play it and see what happens.
2022-10-01 27420, 2022
lucifer
can rework from there as needed.
2022-10-01 27423, 2022
mayhem
that.
2022-10-01 27459, 2022
lucifer
also note this towards the end of the same page:
2022-10-01 27401, 2022
lucifer
> IMPORTANT: If you plan to do further operations on tracks (for example, removing the track from a playlist or saving it to “Your Music”), it is important that you operate on the **original** track id found in the `linked_from` object. Using the ID of the linked track returned at the root level will likely return an error or other unexpected result.
2022-10-01 27434, 2022
mayhem
that actually makes this index very simple. I think it can be calculated by one single query and run through much the same code we have already.
2022-10-01 27454, 2022
lucifer
erroring on linked tracks does not seem a sane thing to do but ...
2022-10-01 27458, 2022
lucifer
ah nice
2022-10-01 27418, 2022
mayhem
I might have some time this morning to play with it, but if you want to have a go, I think this ends up being really simple. now that I understand the moving bits. )
2022-10-01 27421, 2022
mayhem
:)
2022-10-01 27424, 2022
lucifer
oh great, i am working on reworking the mb metadata cache stuff currently but will look at this later.
2022-10-01 27439, 2022
mayhem
ok, my plans for the day just changed, I should have a few hours to be able to look at it. lolsighsob
2022-10-01 27441, 2022
mayhem
lucifer: does postgres have an explode function the way spark does?
2022-10-01 27413, 2022
mayhem
I need to explode an array in the JSON into multiple rows of results, if that is doable.
2022-10-01 27424, 2022
lucifer
mayhem: yes, unnest for arrays. jsonb_array_elements for jsonb arrays.
2022-10-01 27425, 2022
lucifer
you'll probably also need to convert the jsonb objects into columns later iiuc.
2022-10-01 27403, 2022
mayhem
ah yes, I've used the jsonb_array_elements function before. thanks!
2022-10-01 27422, 2022
lucifer
i have unlocked a new tier of BP where a track from spotify and the next track from youtube is played simultaneously lol.
2022-10-01 27441, 2022
mayhem
yes, that bug is very very hard to deuplicate.
2022-10-01 27411, 2022
lucifer
ah i see.
2022-10-01 27434, 2022
adhawkins has quit
2022-10-01 27424, 2022
adhawkins joined the channel
2022-10-01 27418, 2022
Lotheric has quit
2022-10-01 27428, 2022
Lotheric joined the channel
2022-10-01 27400, 2022
CatQuest joined the channel
2022-10-01 27455, 2022
CatQuest joined the channel
2022-10-01 27455, 2022
CatQuest has quit
2022-10-01 27455, 2022
CatQuest joined the channel
2022-10-01 27416, 2022
elgranRoble joined the channel
2022-10-01 27437, 2022
mayhem
lucifer: zas: atj : The high load on gaga, that's me.
thanks for confirming. i'll also run this without group by later to confirm.
2022-10-01 27428, 2022
zas
how can akshaaatt get a working sim for phone/internet on arrival? Are there cheap options available, I'm of no help in this field.
2022-10-01 27416, 2022
CatQuest has left the channel
2022-10-01 27424, 2022
chinmay
lucifer: I'm brainstorming ideas for the timeline feature all day.. couldn't come up with anything that will work.. do you have anything on how should I go on with implementing it?
2022-10-01 27435, 2022
chinmay
cc monkey mayhem
2022-10-01 27445, 2022
elgranRoble joined the channel
2022-10-01 27433, 2022
mayhem
chinmay: give me more background for the question, what is the challenge? what are you stuck on?
2022-10-01 27451, 2022
CatQuest joined the channel
2022-10-01 27451, 2022
CatQuest has quit
2022-10-01 27451, 2022
CatQuest joined the channel
2022-10-01 27448, 2022
CatQuest has quit
2022-10-01 27406, 2022
CatQuest joined the channel
2022-10-01 27411, 2022
CatQuest joined the channel
2022-10-01 27411, 2022
CatQuest has quit
2022-10-01 27411, 2022
CatQuest joined the channel
2022-10-01 27459, 2022
elgranRoble has quit
2022-10-01 27418, 2022
CatQuest has quit
2022-10-01 27437, 2022
chinmay
mayhem: it's about the timeline component. I can't figure out how to implement it.. or where should I start with it..
2022-10-01 27407, 2022
CatQuest joined the channel
2022-10-01 27408, 2022
CatQuest has quit
2022-10-01 27408, 2022
CatQuest joined the channel
2022-10-01 27417, 2022
CatQuest has left the channel
2022-10-01 27415, 2022
CatQuest joined the channel
2022-10-01 27415, 2022
CatQuest has quit
2022-10-01 27415, 2022
CatQuest joined the channel
2022-10-01 27441, 2022
CatQuest has left the channel
2022-10-01 27452, 2022
lucifer
chinmay: i'll see if i can find some library for that and let you know
lucifer: mayhem: I also figured that we might need to use something like a "Load More Fresh Releases" button since there will be 1500+ releases (for 30 days). We don't want users to make 1500+ network calls to the CAA api every time they open the page.. I'm marking that as a future improvement..