#metabrainz

/

      • ruaok
        rdswift: are you taking requests for improvements to OpenPost?
      • 2020-05-12 13334, 2020

      • Mr_Monkey
        OK. Shall I create the LB endpoint and page that we can send requests to?
      • 2020-05-12 13345, 2020

      • ruaok
        I want to post one block of JSON to the target page.
      • 2020-05-12 13349, 2020

      • ruaok
        yes, please.
      • 2020-05-12 13343, 2020

      • Mr_Monkey
        OK. So I'll set up the endpoint and page we need, and work on improving the player. šŸ‘
      • 2020-05-12 13300, 2020

      • ruaok
        fabu.
      • 2020-05-12 13322, 2020

      • Mr_Monkey
        The code we had was a GET endpoint with list of recordings and playlist name/description in args. We'll eventually want a POST endpoint instead, but shall I set that up for now?
      • 2020-05-12 13332, 2020

      • Mr_Monkey
        As a GET, I mean
      • 2020-05-12 13321, 2020

      • Mr_Monkey
        That's where OpenPost was coming in, but I forget if you got it to work back then
      • 2020-05-12 13325, 2020

      • ruaok
        we want POST, so i can post JSON as the body of the request.
      • 2020-05-12 13339, 2020

      • Mr_Monkey
        OK
      • 2020-05-12 13348, 2020

      • ruaok
        I did't back then and we got distracted before we could try rdswift's work.
      • 2020-05-12 13308, 2020

      • ruaok
        but he's proven it works and it just need a minor tweak.
      • 2020-05-12 13316, 2020

      • Mr_Monkey
        Great
      • 2020-05-12 13332, 2020

      • _lucifer
        gr0uch0mars: yeah sure no issues but my internet is a bit slow so i would prefer chat. a videocall is a bit difficult but possible if need be.
      • 2020-05-12 13328, 2020

      • Mr_Monkey
        Hey that's an esay way we can save playlists, by the way. OpenPost outputs an html file, and if we date them or give them a naming scheme you'll have your playlist file.
      • 2020-05-12 13348, 2020

      • Mr_Monkey
        (`--keep-file` flag)
      • 2020-05-12 13334, 2020

      • ruaok
        yeah, I wonder about the utility of a local files clattering about.
      • 2020-05-12 13359, 2020

      • gr0uch0mars
        _lucifer: I'm OK with the chat. Do you know if there's a way to make a room here in IRC for us three?
      • 2020-05-12 13320, 2020

      • ruaok
        gr0uch0mars: just `/join #room-name` and if the room doesn't exist, it will be created for you.
      • 2020-05-12 13339, 2020

      • ruaok
        but why not actually hold the meeting here, if things are not too noisy here already?
      • 2020-05-12 13303, 2020

      • gr0uch0mars
        ruaok: thanks for the command. Now it's not too noisy, but I don't know if when we are connected at the same time, it'll be the same…
      • 2020-05-12 13323, 2020

      • ruaok
        if too noisy then, make a room.
      • 2020-05-12 13332, 2020

      • gr0uch0mars
        šŸ‘šŸ»
      • 2020-05-12 13339, 2020

      • ruaok
        but then again, reosarevok might still get angry for you for having too much on-topic conversation here.
      • 2020-05-12 13351, 2020

      • ruaok
        šŸƒā€ā™€ļø
      • 2020-05-12 13305, 2020

      • reosarevok
        ruaok: what can I say, I get crankier with every year :D
      • 2020-05-12 13310, 2020

      • reosarevok
        (here is fine)
      • 2020-05-12 13325, 2020

      • ruaok
        you're just 20 years ahead of the curve, really.
      • 2020-05-12 13356, 2020

      • reosarevok
        What can I say, I was born ready
      • 2020-05-12 13300, 2020

      • iliekcomputers
        where are these api endpoints hosted? they're not in master
      • 2020-05-12 13301, 2020

      • reosarevok
        (for old age)
      • 2020-05-12 13323, 2020

      • ruaok
        which ones, iliekcomputers ?
      • 2020-05-12 13327, 2020

      • iliekcomputers
        the playlist ones
      • 2020-05-12 13339, 2020

      • iliekcomputers
        is it in a different branch?
      • 2020-05-12 13300, 2020

      • ruaok
        try looking at the standalone-player branch.
      • 2020-05-12 13307, 2020

      • ruaok
        Mr_Monkey posted links to it ealier.
      • 2020-05-12 13325, 2020

      • iliekcomputers
        got it. sorry.
      • 2020-05-12 13355, 2020

      • ruaok
        np, that wasn't meant as a "read the backscroll!" comment. :)
      • 2020-05-12 13329, 2020

      • iliekcomputers
        one suggestion (i realize it might not be realistic): we should try to keep as much of this stuff in master as possible. that way we all get benefits of improvements like the typescript stuff and automated tests that we set up since the work on this branch, and it's easier to merge and release.
      • 2020-05-12 13309, 2020

      • iliekcomputers
        there's stuff like an extra permission removal for spotify in the branch that we basically duplicated.
      • 2020-05-12 13313, 2020

      • ruaok
        what do we do with half-baked code like this? it was nowhere near mergable.
      • 2020-05-12 13335, 2020

      • iliekcomputers
        ruaok: having such a large branch of half baked code is the thing that i want to avoid. this branch also probably had a bunch of subtasks / small prs on the branch etc. i'd prefer if those target master as much as possible, so that these branches don't accumulate.
      • 2020-05-12 13309, 2020

      • ruaok
        ok, where do we keep code that we're "just playing around" with?
      • 2020-05-12 13310, 2020

      • iliekcomputers
        i realize it's not always possible (hackathons etc), but for the general use case where we're working weeks and months on things, master should be the way to go
      • 2020-05-12 13307, 2020

      • iliekcomputers
        keep it in a branch, sure. i'm not saying we don't do any other branches. just saying that it'd be nice if we all tried to merge as much of that into master as soon as possible.
      • 2020-05-12 13344, 2020

      • iliekcomputers
        so that instead of huge PRs, we have smaller ones.
      • 2020-05-12 13327, 2020

      • _lucifer
        gr0uch0mars: i am available right now, we can start right now if its fine with you
      • 2020-05-12 13332, 2020

      • iliekcomputers
        anyways, just an opinion. i realize it won't make sense a lot of the time.
      • 2020-05-12 13300, 2020

      • _lucifer
        i am fine with both having it here or in other room
      • 2020-05-12 13307, 2020

      • prabal
        Mr_Monkey: ping
      • 2020-05-12 13300, 2020

      • BrainzGit
        [musicbrainz-server] reosarevok opened pull request #1511 (master…MBS-10186): MBS-10186: Check for missing CD TOC on SetTrackLengths https://github.com/metabrainz/musicbrainz-server/…
      • 2020-05-12 13301, 2020

      • BrainzBot
        MBS-10186: ā€œSet track lengthsā€ edit is stuck https://tickets.metabrainz.org/browse/MBS-10186
      • 2020-05-12 13323, 2020

      • reosarevok
        yvanzo: are you around?
      • 2020-05-12 13329, 2020

      • reosarevok
        Or maybe others have suggestions
      • 2020-05-12 13358, 2020

      • reosarevok
        https://musicbrainz.org/edit/58112462 is stuck because it's trying to merge a group into an artist with no type, but gender
      • 2020-05-12 13326, 2020

      • reosarevok
        That means the type should be set to group by the merge (since it's empty) but a group can't have gender, so it crashes
      • 2020-05-12 13343, 2020

      • reosarevok
        Should we fail the edit in this case, should we drop the type?
      • 2020-05-12 13350, 2020

      • reosarevok
        (and still merge them)
      • 2020-05-12 13356, 2020

      • reosarevok
        Or what would seem sensible
      • 2020-05-12 13334, 2020

      • jmp_music
        alastairp: Just got your email. The download process has already begun. :)
      • 2020-05-12 13341, 2020

      • yvanzo
        reosarevok: If you ask me about this specific edit, the target artist should be a group, not an undefined male.
      • 2020-05-12 13344, 2020

      • alastairp
        great šŸ‘
      • 2020-05-12 13304, 2020

      • reosarevok
        yvanzo: no, I ask about the general case where group is merged into something with gender
      • 2020-05-12 13323, 2020

      • reosarevok
        If you think it should be completely case-per-case, then the better might be to fail the edit?
      • 2020-05-12 13325, 2020

      • yvanzo
        reosarevok: I would say that entries with dubious data make dubious targets, so we should probably fail such edit with a ModBot’s message.
      • 2020-05-12 13331, 2020

      • reosarevok
        Ok
      • 2020-05-12 13347, 2020

      • jmp_music
        alastairp: thanks for uploading the audio files too. I would to experiment in further features extraction in case it is possible
      • 2020-05-12 13300, 2020

      • jmp_music
        *I would like
      • 2020-05-12 13340, 2020

      • alastairp
        yeah, as a general classification task this would be interesting. Remember of course that in AcousticBrainz we only have the feature files that I gave you
      • 2020-05-12 13319, 2020

      • v6lur joined the channel
      • 2020-05-12 13329, 2020

      • iliekcomputers
        I pay 80 inr per month for Spotify still 🤣
      • 2020-05-12 13355, 2020

      • shivam-kapila
        59?
      • 2020-05-12 13306, 2020

      • shivam-kapila
        Its 59 for students
      • 2020-05-12 13319, 2020

      • iliekcomputers
        I'm not a student
      • 2020-05-12 13326, 2020

      • iliekcomputers
        Thankfully.
      • 2020-05-12 13310, 2020

      • Mr_Monkey
        prabal: pong
      • 2020-05-12 13325, 2020

      • prabal
        I need to use a library which gives difference in array. Need to find difference in oldCollaborators and newCollaborators in user-collection form
      • 2020-05-12 13340, 2020

      • prabal
        should i go with jsondiffpatch?
      • 2020-05-12 13359, 2020

      • Mr_Monkey
        You should be able to use lodash for that
      • 2020-05-12 13310, 2020

      • prabal
        Hmm oh yeah
      • 2020-05-12 13314, 2020

      • prabal
        i forgot about lodash
      • 2020-05-12 13320, 2020

      • prabal
        I am not focusing too much on the UI rn
      • 2020-05-12 13323, 2020

      • Mr_Monkey
      • 2020-05-12 13330, 2020

      • prabal
        because we haven't finalized them
      • 2020-05-12 13349, 2020

      • Mr_Monkey
        That's fine, functionality should come first
      • 2020-05-12 13355, 2020

      • prabal
      • 2020-05-12 13335, 2020

      • Mr_Monkey
        Looks like we have the basics
      • 2020-05-12 13303, 2020

      • prabal
        yeah
      • 2020-05-12 13309, 2020

      • prabal
        alright I will try lodash
      • 2020-05-12 13316, 2020

      • prabal
        Thankss!
      • 2020-05-12 13326, 2020

      • BrainzGit
        [musicbrainz-server] reosarevok opened pull request #1512 (master…MBS-10821): MBS-10821: Remove orphaned recordings from collections for deletion https://github.com/metabrainz/musicbrainz-server/…
      • 2020-05-12 13327, 2020

      • BrainzBot
        MBS-10821: Edit changing medium tracklist and format is stuck https://tickets.metabrainz.org/browse/MBS-10821
      • 2020-05-12 13300, 2020

      • rdswift
        <ruaok> rdswift: are you taking requests for improvements to OpenPost? Sure, if I can. I'm just a hack when it comes to some of that stuff.
      • 2020-05-12 13301, 2020

      • ruaok
        well, thats a nice looking hack ya got there.
      • 2020-05-12 13332, 2020

      • ruaok
        as you may have gathered from the discussion above... I'd love to be able to POST a JSON document to a webpage.
      • 2020-05-12 13348, 2020

      • ruaok
        I have a lot of data and serializing it to html form params would be a nightmare.
      • 2020-05-12 13344, 2020

      • ruaok
        I'd love to be able to redirect the JSON string to openpost.py and have it write the file and do the submission.
      • 2020-05-12 13301, 2020

      • rdswift
        Can you provide an example of what you want to send? I think I understand, but I want to make sure. Also gives me something to test with.
      • 2020-05-12 13352, 2020

      • reosarevok
        yvanzo: hmm. Seems the other way around (gender male merged into group) we just drop the gender and allow the merge
      • 2020-05-12 13354, 2020

      • rdswift
        ruaok, another option might be to post it as json="your_json_string" and then parse the json at the receiver.
      • 2020-05-12 13327, 2020

      • rdswift
        That way there's only one form parameter.
      • 2020-05-12 13348, 2020

      • reosarevok
        yvanzo: I do think failing the merge makes sense though, so I'll send a PR for that, but we might want to make this consistent eventually
      • 2020-05-12 13343, 2020

      • yvanzo
        ok
      • 2020-05-12 13321, 2020

      • BrainzGit
        [musicbrainz-server] reosarevok opened pull request #1513 (master…MBS-10187): MBS-10187: Fail edits that would result in a gendered group https://github.com/metabrainz/musicbrainz-server/…
      • 2020-05-12 13322, 2020

      • BrainzBot
        MBS-10187: "Merge artits" edit is stuck https://tickets.metabrainz.org/browse/MBS-10187
      • 2020-05-12 13330, 2020

      • jmp_music has quit
      • 2020-05-12 13351, 2020

      • Mr_Monkey
        ruaok: Is there a way to make flask output the whole url for files, rather than a relative path?
      • 2020-05-12 13351, 2020

      • Mr_Monkey
        Otherwise, I'm not sure what we want to do with the page returned from the POST request (which will point to js and less files with relative path).
      • 2020-05-12 13340, 2020

      • Mr_Monkey
        There's also the question of auth: considering we want to access the user's spotify account details (if any), do we send an auth token in the POST request?
      • 2020-05-12 13344, 2020

      • Mr_Monkey
        for url_for, I think I found how to generate a absolute url
      • 2020-05-12 13345, 2020

      • ruaok
        rdswift: yes, that is possible, but there is one signficant snag with that -- maximum URL length.
      • 2020-05-12 13330, 2020

      • ruaok
        there is no clear definition of the largest one, so implementation differs. and we're talking about 20k-30k of data being posted, possibly...
      • 2020-05-12 13348, 2020

      • ruaok
        it would likely lead to a bad user experience
      • 2020-05-12 13342, 2020

      • rdswift
        Okay. So if I understand, you want to be able to pass a file (or stream) as the argument to openpost?
      • 2020-05-12 13314, 2020

      • ruaok
        no, i would prefer to be able to do something like this:
      • 2020-05-12 13316, 2020

      • CatQuest
        yvanzo, reosarevok : oooohr you could just do this : https://beta.musicbrainz.org/edit/69712499
      • 2020-05-12 13317, 2020

      • ruaok
        `echo "{ 'thisbejson' : 1}" | openpost.py http://listenbrainz.org/play`
      • 2020-05-12 13345, 2020

      • reosarevok
        CatQuest: that only fixes this one edit though :)
      • 2020-05-12 13352, 2020

      • CatQuest
        true.
      • 2020-05-12 13353, 2020

      • reosarevok
        It won't fix other edits that will fail for the same reason
      • 2020-05-12 13356, 2020

      • CatQuest
        but still ;)
      • 2020-05-12 13318, 2020

      • ruaok
        so, openpost should read open sys.stdin and read the whole stream and then POST that data as the body of the request
      • 2020-05-12 13319, 2020

      • reosarevok
        So while this is a reasonable solution for this (now that we figured out what's the problem) we still needed to code an actual consistent thing :)
      • 2020-05-12 13321, 2020

      • CatQuest
        (I see your point though. but it's still)
      • 2020-05-12 13325, 2020

      • reosarevok
        But thanks for fixing this one, CatQuest!
      • 2020-05-12 13329, 2020

      • CatQuest
        :D
      • 2020-05-12 13339, 2020

      • ruaok
        Mr_Monkey: 'url for files' for what?
      • 2020-05-12 13351, 2020

      • Mr_Monkey
        js and css files
      • 2020-05-12 13313, 2020

      • rdswift
        Okay, I think I understand. That should be doable. Let me chew on it for a bit.
      • 2020-05-12 13319, 2020

      • ruaok
        rdswift: super, thanks!
      • 2020-05-12 13329, 2020

      • CatQuest
        https://beta.musicbrainz.org/edit/58112462 has turned into a "who's who" of voters :P
      • 2020-05-12 13330, 2020

      • ruaok
        Mr_Monkey: can you backup a sec and give me more context?
      • 2020-05-12 13343, 2020

      • ruaok
        I'm confused as to what you're asking and sense some confusion
      • 2020-05-12 13302, 2020

      • CatQuest
        .. I mean.. wow the first vote was cast 2018-12-15 15:22 CET actually
      • 2020-05-12 13304, 2020

      • CatQuest
        so while I agree that "code some thing that fixes it so this no longer happens (edits open for YEARS) it's still ridicolous that it's been open for years and noone's managed to make more noize so we figured otu what it was so we could fix it :D
      • 2020-05-12 13348, 2020

      • Mr_Monkey
        Sure. The POST request you mant to make is supposed to return an html page, correct? That page will currently point to resources on the server with a relative path (eg `/static/js/player.js`). If you try to open that page, it won't work as the relative path is not pointing to the server anymore.
      • 2020-05-12 13307, 2020

      • Mr_Monkey
        Transforming paths to resources into absolute paths would solve that issue
      • 2020-05-12 13347, 2020

      • ruaok
        ah, I see.
      • 2020-05-12 13311, 2020

      • Mr_Monkey
        Unless I misunderstood something, the POST method presents a few challenges
      • 2020-05-12 13314, 2020

      • ruaok
        so, the workflow for this is: 1) python script does magic, creates playlist. 2) writes playlist to openpost, which creates a tiny html page. 3) tiny html page gets opened in the browser, which immediately POSTs and loads the LB play page.
      • 2020-05-12 13338, 2020

      • rdswift
        ruaok, just to clarify... Using your example, the form content would be sonething like: <input type="hidden" name="thisbejenson" value="1">
      • 2020-05-12 13346, 2020

      • ruaok
        which means that you are making a stinking normal player page that can be invoked via POST. otherwise there is nothing special about this page, nothing special needs to be done with paths.
      • 2020-05-12 13351, 2020

      • CatQuest
        ruaok: do your one vote a year stickh on this: https://beta.musicbrainz.org/edit/58112462
      • 2020-05-12 13300, 2020

      • Mr_Monkey
        OK
      • 2020-05-12 13306, 2020

      • CatQuest
        monkey tooo
      • 2020-05-12 13309, 2020

      • Mr_Monkey
        Makes more sense
      • 2020-05-12 13316, 2020

      • ruaok
        Mr_Monkey: kewl.
      • 2020-05-12 13319, 2020

      • ruaok
        easier, no?
      • 2020-05-12 13339, 2020

      • bitmap
        reosarevok: I think we discussed MBS-10187 at some point and decided that allowing the edit to pass but leaving a ModBot note about the type/gender being dropped was ok. at least I have a branch that does that