#metabrainz

/

      • adhawkins has quit
      • adhawkins joined the channel
      • d4rkie joined the channel
      • d4rk-ph0enix has quit
      • elgranRoble has quit
      • d4rk-ph0enix joined the channel
      • d4rkie_ has quit
      • darkstardevx has quit
      • darkstardevx joined the channel
      • darkstardevx has quit
      • BrainzGit
        [design-system] 14Aerozol opened pull request #84 (03master…master): Update README.md https://github.com/metabrainz/design-system/pul...
      • [design-system] 14Aerozol merged pull request #84 (03master…master): Update README.md https://github.com/metabrainz/design-system/pul...
      • mayhem
        moooin!
      • 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.
      • lucifer
        mayhem: can get it from https://developer.spotify.com/documentation/web..., but according to https://developer.spotify.com/documentation/gen... it should work ok anyway.
      • mayhem
        oh phew. great. ok, thanks for that.
      • hm, but this isn't exactly clear what we need to do from here, is it?
      • is track relinking done automatically on playback?
      • 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.
      • from this, i assume yes.
      • mayhem
        that's the problem with spotify and their APIs. Assuming is no good. nor is trusting. lol.
      • well, we'll find out soon enough.
      • lucifer
        lol true indeed.
      • mayhem
        but then the reverse index is pretty simple.
      • lucifer
        yes makes sense
      • mayhem
        order by release date, album_type.
      • but I still don't really understand how the whole market/region will play out into this.
      • 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.
      • 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.
      • can rework from there as needed.
      • mayhem
        that.
      • lucifer
        also note this towards the end of the same page:
      • > 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.
      • 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.
      • lucifer
        erroring on linked tracks does not seem a sane thing to do but ...
      • ah nice
      • 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. )
      • :)
      • lucifer
        oh great, i am working on reworking the mb metadata cache stuff currently but will look at this later.
      • mayhem
        ok, my plans for the day just changed, I should have a few hours to be able to look at it. lolsighsob
      • lucifer: does postgres have an explode function the way spark does?
      • I need to explode an array in the JSON into multiple rows of results, if that is doable.
      • lucifer
        mayhem: yes, unnest for arrays. jsonb_array_elements for jsonb arrays.
      • you'll probably also need to convert the jsonb objects into columns later iiuc.
      • mayhem
        ah yes, I've used the jsonb_array_elements function before. thanks!
      • lucifer
        i have unlocked a new tier of BP where a track from spotify and the next track from youtube is played simultaneously lol.
      • mayhem
        yes, that bug is very very hard to deuplicate.
      • lucifer
        ah i see.
      • adhawkins has quit
      • adhawkins joined the channel
      • Lotheric has quit
      • Lotheric joined the channel
      • CatQuest joined the channel
      • CatQuest joined the channel
      • CatQuest has quit
      • CatQuest joined the channel
      • elgranRoble joined the channel
      • mayhem
        lucifer: zas: atj : The high load on gaga, that's me.
      • lucifer
        👍
      • zas
        mayhem: ok ;)
      • CatQuest joined the channel
      • mayhem
        nearly 11 cores at 100% CPU. oy.
      • lucifer
        hmmm if i see correctly, no aggregate function used but we have a group by ? https://github.com/metabrainz/listenbrainz-serv...
      • elgranRoble has quit
      • mayhem
        lucifer: looks that way.
      • lucifer
        thanks for confirming. i'll also run this without group by later to confirm.
      • 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.
      • CatQuest has left the channel
      • 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?
      • cc monkey mayhem
      • elgranRoble joined the channel
      • mayhem
        chinmay: give me more background for the question, what is the challenge? what are you stuck on?
      • CatQuest joined the channel
      • CatQuest has quit
      • CatQuest joined the channel
      • CatQuest has quit
      • CatQuest joined the channel
      • CatQuest joined the channel
      • CatQuest has quit
      • CatQuest joined the channel
      • elgranRoble has quit
      • CatQuest has quit
      • chinmay
        mayhem: it's about the timeline component. I can't figure out how to implement it.. or where should I start with it..
      • CatQuest joined the channel
      • CatQuest has quit
      • CatQuest joined the channel
      • CatQuest has left the channel
      • CatQuest joined the channel
      • CatQuest has quit
      • CatQuest joined the channel
      • CatQuest has left the channel
      • lucifer
        chinmay: i'll see if i can find some library for that and let you know
      • chinmay
        lucifer: Thanks. I found these that are closest for our use case - https://github.com/zillow/react-slider https://github.com/lizashkod/react-timeline-ran...
      • gsap is an animation library and it will be an overkill to use this https://tympanus.net/codrops/2022/01/03/buildin...
      • 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..
      • elgranRoble joined the channel
      • MRiddickW joined the channel