#metabrainz

/

      • ruaok runs off for lunch
      • 2021-10-06 27902, 2021

      • gcrkhehim[m]
        these swagger docs are not really verbose, I need to check the docs
      • 2021-10-06 27928, 2021

      • gcrkhehim[m]
        ruaok: There are only a few devs who are working on native funkwhale clients and I don't think its a nice idea to put pressure on them. We can add API endpoints, but we need to do this the right way. But in this case I think everything is in place to get it somehow working
      • 2021-10-06 27928, 2021

      • monkey
        Yes, the combination search endpoint - get first returned track - get listen_url -play content seems like it would work well.
      • 2021-10-06 27956, 2021

      • outsidecontext
        this integration of FW in the LB player would be awesome indeed. I'd love it
      • 2021-10-06 27935, 2021

      • tandy[m]
        + an ability to link your funkwhale instance to your listenbrainz profile would be useful, that way people could easily share their music libraries with listenbrainz
      • 2021-10-06 27949, 2021

      • tandy[m]
        s/+/plus/, s/an/the/
      • 2021-10-06 27900, 2021

      • tandy[m]
        s/+ an ability to link your funkwhale instance to your listenbrainz profile would be useful, that way people could easily share their music libraries with listenbrainz/plus the ability to link your funkwhale instance to your listenbrainz profile would be useful, that way people could easily share their music libraries with others on listenbrainz/
      • 2021-10-06 27917, 2021

      • tandy[m]
        so you arent just limited to the open.audio instance
      • 2021-10-06 27928, 2021

      • gcrkhehim[m]
        monkey: You cannot specify the fields to search, only do a string search
      • 2021-10-06 27943, 2021

      • monkey
        Thanks for checking that.
      • 2021-10-06 27938, 2021

      • monkey
        I'm guessing that might result in less precise results, judging from using the youtube search
      • 2021-10-06 27936, 2021

      • monkey
        On the other hand if MBID is available and returns a result that's ace
      • 2021-10-06 27942, 2021

      • gcrkhehim[m]
        You'll get artists, tracks, albums and tags in different arrays, so you can filter this way
      • 2021-10-06 27943, 2021

      • gcrkhehim[m]
        So you can emulate a album search by doing search?q=$name and then only look at album in the response
      • 2021-10-06 27944, 2021

      • monkey
        That might require doing two searches in a row, one with MBID and one with the song title + artist
      • 2021-10-06 27901, 2021

      • monkey
        Yep, I saw that, it's really convenient
      • 2021-10-06 27913, 2021

      • monkey
        And If I look up an album title and get a result in the album array, I can go fetch a song from that (BrainzPlayer on really manages to play single songs at the moment)
      • 2021-10-06 27948, 2021

      • monkey
        That's really convenient
      • 2021-10-06 27940, 2021

      • yvanzo
        reosarevok: About our previous discussion on entering a second date period: Wouldn’t #2288 make it impossible?
      • 2021-10-06 27912, 2021

      • Etua joined the channel
      • 2021-10-06 27930, 2021

      • reosarevok
        No, that seems to just merge them into the same *block* but not into one relationship (it still shows it's a dupe)
      • 2021-10-06 27905, 2021

      • reosarevok
        Obviously I can't currently submit, because they're detected as dupes, but I could set two dates and they were shown differently and correctly in the editor
      • 2021-10-06 27921, 2021

      • nawcom joined the channel
      • 2021-10-06 27922, 2021

      • Etua has quit
      • 2021-10-06 27957, 2021

      • Etua joined the channel
      • 2021-10-06 27937, 2021

      • Etua has quit
      • 2021-10-06 27905, 2021

      • reosarevok
        bitmap: meh, I'm not sure what's the best way to do this in Perl either. I'm doing horrible things like this already: my ($CLEANUPS) = $file_content =~ m/const CLEANUPS: CleanupEntries = ({.*};)\s+function testAll/gsi;
      • 2021-10-06 27926, 2021

      • reosarevok
        (which will break as soon as someone changes the URLCleanup file)
      • 2021-10-06 27934, 2021

      • reosarevok
        Honestly, duplicating might be the simplest option
      • 2021-10-06 27931, 2021

      • reosarevok
        Maybe we can have a test that checks the regexes are the same or something, if we want to make sure we don't forget to duplicate changes
      • 2021-10-06 27904, 2021

      • bitmap
        ok. I'd prefer importing them into URLCleanup, but whatever you think is best there
      • 2021-10-06 27914, 2021

      • zas
        I'll switch to herb in order to test nginx params (related to listen drops we get atm)
      • 2021-10-06 27934, 2021

      • reosarevok
        yvanzo: what do you feel? Turns out parsing with either JS or Perl to save into its own file is quite annoying
      • 2021-10-06 27933, 2021

      • reosarevok
        So we have the easiest two options of either keeping the match and having a separate file with only regexes which we keep in sync by hand, or having the regexes on a separate file and importing it into URLCleanup, it seems
      • 2021-10-06 27916, 2021

      • bitmap
        in vscode I can press F12 to jump to the definition for something, & in vim you can do the same with the right LSP plugin, so I think it's not so bad to import them
      • 2021-10-06 27912, 2021

      • reosarevok
        I'm fine with either way
      • 2021-10-06 27931, 2021

      • reosarevok
        bitmap: can we merge https://github.com/metabrainz/musicbrainz-server/… and then rebase everything on top of that and hope for less messy tests then? :p
      • 2021-10-06 27940, 2021

      • BrainzGit
        [musicbrainz-server] 14mwiencek merged pull request #2289 (03master…mbs-11983): Try to fix flaky Selenium tests (fixes MBS-11983) https://github.com/metabrainz/musicbrainz-server/…
      • 2021-10-06 27957, 2021

      • bitmap
        yes :)
      • 2021-10-06 27920, 2021

      • BrainzGit
        [listenbrainz-server] 14MonkeyDo opened pull request #1643 (03master…monkey-brainzplayer-events): Use browser events for communication with BrainzPlayer https://github.com/metabrainz/listenbrainz-server…
      • 2021-10-06 27902, 2021

      • monkey
        This brings us a step closer to an embeddable BrainzPlayer ^
      • 2021-10-06 27925, 2021

      • outsidecontext
        !m monkey
      • 2021-10-06 27925, 2021

      • BrainzBot
        You're doing good work, monkey!
      • 2021-10-06 27901, 2021

      • reosarevok
      • 2021-10-06 27930, 2021

      • monkey
        I'm deploying the above PR to test.LB
      • 2021-10-06 27955, 2021

      • reosarevok
        That's surprising, given it's an MBS one
      • 2021-10-06 27957, 2021

      • reosarevok hides
      • 2021-10-06 27924, 2021

      • zas
        rebooting herb
      • 2021-10-06 27958, 2021

      • zas
        herb rebooted, switching gateway to it
      • 2021-10-06 27926, 2021

      • zas
        rebooting kiki
      • 2021-10-06 27949, 2021

      • BrainzGit has quit
      • 2021-10-06 27908, 2021

      • BrainzGit joined the channel
      • 2021-10-06 27945, 2021

      • tandy[m]
        is there a logo for the BrainzPlayer? or should I just use the ListenBrainz logo for now?
      • 2021-10-06 27936, 2021

      • zas
        switching back to kiki
      • 2021-10-06 27956, 2021

      • monkey
        No special logo for BP, tandy[m]
      • 2021-10-06 27914, 2021

      • tandy[m]
        cool, thanks!
      • 2021-10-06 27905, 2021

      • monkey
        By the way tandy[m] you might be interested in this PR, which switches to using browser events to communicate with BrainzPlayer: https://github.com/metabrainz/listenbrainz-server…
      • 2021-10-06 27923, 2021

      • monkey
        It will be very handy for embedding it in other pages
      • 2021-10-06 27947, 2021

      • tandy[m]
        Oh awesome i just saw that
      • 2021-10-06 27938, 2021

      • monkey
        I've thought about the standalone player project a bit more, and with that PR it seems to me we're not far off from being able to use it in other websites.
      • 2021-10-06 27901, 2021

      • tandy[m]
        im excited!
      • 2021-10-06 27903, 2021

      • monkey
        I still have to figure out how to deal with some duplicated code; BrainzPlayer can live in a separate package, but we currently also need access to some API service in the codebase. Separating the two might be a good self-contained project if you're interested in putting your hands in it ;p
      • 2021-10-06 27955, 2021

      • tandy[m]
        monkey: yes! if you could give me some details i can get stuck in
      • 2021-10-06 27923, 2021

      • monkey
        Awesome ! let me write that up
      • 2021-10-06 27907, 2021

      • ruaok
        lucifer: alastairp : this report https://sentry.metabrainz.org/organizations/metab… is being caused by a container that I didn't update yesterday. but which one? is there any way to find out which container this issue came from?
      • 2021-10-06 27926, 2021

      • alastairp
        I see the tag `environment: test`, which seems to indicate to me that it's coming from something that's loading the test consul config
      • 2021-10-06 27945, 2021

      • ruaok
        ah, a good tip.
      • 2021-10-06 27949, 2021

      • alastairp
        good point though, we should be able to do something like set a tag which is the docker container id, which would make this easier to track down
      • 2021-10-06 27959, 2021

      • ruaok
        monkey: can you please merge master into your branch and re-deploy to test?
      • 2021-10-06 27906, 2021

      • monkey
        Sure thing !
      • 2021-10-06 27912, 2021

      • ruaok nods at monkey and alastairp
      • 2021-10-06 27945, 2021

      • monkey
        Stupidly I looked up to see if I missed your arrival at the office and you were physically nodding at us…
      • 2021-10-06 27912, 2021

      • ruaok
        nope, no office for me today. I'll be in tomorrow.
      • 2021-10-06 27917, 2021

      • monkey
        tandy[m]: So as I was saying one of the steps to have a standalone BrainzPlayer is to remove the existing links with the rest of the ListenBrainz codebase.
      • 2021-10-06 27917, 2021

      • monkey
        Currently we import and use the APIService class (https://github.com/metabrainz/listenbrainz-server…) to interact with LB, and we’re not going to want to bundle that code along with the player.
      • 2021-10-06 27903, 2021

      • monkey
        We currently do 3 things with the LB API in BrainzPlayer: refresh spotify token, refresh youtube token and submit listens to LB
      • 2021-10-06 27956, 2021

      • monkey
        The first two methods will need to be implemented outside of BP and passed to it as props.
      • 2021-10-06 27956, 2021

      • monkey
        In our case they are implemented already in APIService but need to be passed in as new optional BP props. We will be able to create a BP instance with `<BrainzPlayer refreshSpotifyToken={APIService.refreshSpotifyToken} …`
      • 2021-10-06 27956, 2021

      • monkey
        and inside BP create `<SpotifyPlayer refreshSpotifyToken={this.props. refreshSpotifyToken}`
      • 2021-10-06 27917, 2021

      • monkey
        The third method to submit listens should be implemented directly in BP I think, which means copying and adapting this bit of code :
      • 2021-10-06 27917, 2021

      • monkey
      • 2021-10-06 27925, 2021

      • monkey
        from APIService into the `submitListenToListenBrainz` method in BP:
      • 2021-10-06 27925, 2021

      • monkey
      • 2021-10-06 27924, 2021

      • monkey
        I know it's all a bit dense when discovering the codebase, but I'm happy to help and to answer any questions
      • 2021-10-06 27931, 2021

      • monkey
        alastairp just suggested I open a ticket for this instead of this wall of text, which I should have thought of first :p Sorry everyone !
      • 2021-10-06 27953, 2021

      • alastairp
        :)
      • 2021-10-06 27934, 2021

      • monkey
        Here you go tandy[m]: LB-957
      • 2021-10-06 27935, 2021

      • BrainzBot
        LB-957: Separate APIService from BrainzPlayer https://tickets.metabrainz.org/browse/LB-957
      • 2021-10-06 27922, 2021

      • lucifer
        ruaok: i see you got the answer already. to add to it, if the tags above the trace contain a url, it'll usually tell the container, test.lb -> web-test, beta.lb -> web-beta so on.
      • 2021-10-06 27901, 2021

      • tandy[m]
        <monkey> "Here you go tandy: LB-957" <- ty!
      • 2021-10-06 27901, 2021

      • BrainzBot
        LB-957: Separate APIService from BrainzPlayer https://tickets.metabrainz.org/browse/LB-957
      • 2021-10-06 27908, 2021

      • tandy[m]
        wait we can refresh a spotify token using the LB API?
      • 2021-10-06 27912, 2021

      • monkey
        ruaok: test.LB updated
      • 2021-10-06 27913, 2021

      • tandy[m]
        is that a hidden api?
      • 2021-10-06 27945, 2021

      • monkey
        It is used entirely internally as far as I know
      • 2021-10-06 27950, 2021

      • lucifer
        its not hidden but restricted to LB web. no CORS
      • 2021-10-06 27910, 2021

      • tandy[m]
        interesting!
      • 2021-10-06 27940, 2021

      • tandy[m]
        ahh the brainzplayer code isnt python ahha time to learn typescript
      • 2021-10-06 27949, 2021

      • monkey
        Oh, woopsie :D
      • 2021-10-06 27951, 2021

      • tandy[m]
        thats fine, il probably need to know some typescript to be able to embed the brainzplayer into my nim project
      • 2021-10-06 27953, 2021

      • lucifer
        uh! actually the api is not CORS restricted but needs a cookie so effectively same.
      • 2021-10-06 27916, 2021

      • akshat
        lucifer: would you have some insight as to how we could switch the colors of a project?
      • 2021-10-06 27928, 2021

      • akshat
        Somewhat like how we do in android.
      • 2021-10-06 27944, 2021

      • lucifer
        like letting user set a theme?
      • 2021-10-06 27956, 2021

      • akshat
        Currently I have made all these components and am sorta individually changing the colors upon button click
      • 2021-10-06 27915, 2021

      • akshat
        I want to use color variables
      • 2021-10-06 27915, 2021

      • lucifer
        or just a permanent change of colors?
      • 2021-10-06 27932, 2021

      • akshat
        User theme. Currently we just have 2 though
      • 2021-10-06 27905, 2021

      • akshat
        Basically my idea is, have a css file with all the colors mentioned and use those variables throughout the project
      • 2021-10-06 27933, 2021

      • akshat
        As soon as the user hits the button, change all the colors and have the render done across the whole project
      • 2021-10-06 27951, 2021

      • lucifer
        don't know much but we use react context, so that can be used to use colors. its one of the intended use cases per the docs.
      • 2021-10-06 27914, 2021

      • lucifer
        the actual colors would live in a .less file.
      • 2021-10-06 27948, 2021

      • lucifer
        and you can preserve theme preferences with a cookie.
      • 2021-10-06 27901, 2021

      • akshat
        Hmm that works well
      • 2021-10-06 27935, 2021

      • akshat
        But I mean, switching all the colors at once without having to explicitly check for them in every component would be great
      • 2021-10-06 27937, 2021

      • lucifer
        for LB, however there's another involved task. some stuff lives in jinja template which is rendered server side. so you need to reload the page.
      • 2021-10-06 27949, 2021

      • akshat
        Hmmm
      • 2021-10-06 27925, 2021

      • lucifer
        i don't think you need a check in any component for react context part.
      • 2021-10-06 27949, 2021

      • akshat
        Oh okay. I'll check that up once again then!
      • 2021-10-06 27957, 2021

      • lucifer
      • 2021-10-06 27955, 2021

      • lucifer
        the topmost component creates a context and sets the theme, the individual sub components can just access it like context.tabColor so on.
      • 2021-10-06 27921, 2021

      • lucifer
        monkey probably knows more and may have thoughts on how to do this.
      • 2021-10-06 27906, 2021

      • monkey
        Haven't tried myself, but I did see it used as an example fro globalcontext, probably a good way to do it
      • 2021-10-06 27940, 2021

      • lucifer
        afaik a page reload will be needed for theme change. because the entire website is not in react. there's entire pages in just plain jinja and the navbar and footer are also in jinja.
      • 2021-10-06 27918, 2021

      • lucifer
        at that point it might be just easier to send a different css file to the frontend depending on the theme.
      • 2021-10-06 27902, 2021

      • akshat
        Great. Thanks!
      • 2021-10-06 27930, 2021

      • yyoung[m]
        It seems to be a common practice, just store theme colors as a variable in global context, like this: https://ant.design/docs/react/customize-theme-var…
      • 2021-10-06 27912, 2021

      • akshat
        This one's really cool and kinda like what I wanted yyoung[m] !
      • 2021-10-06 27922, 2021

      • akshat
        But I don't want to use ant design in the project rn
      • 2021-10-06 27940, 2021

      • yyoung[m]
        Yes I know that :)
      • 2021-10-06 27928, 2021

      • ssam has quit
      • 2021-10-06 27911, 2021

      • ssam joined the channel
      • 2021-10-06 27919, 2021

      • BrainzGit
        [listenbrainz-server] 14tandy-1000 opened pull request #1644 (03master…master): LB-957: Separate APIService from BrainzPlayer https://github.com/metabrainz/listenbrainz-server…
      • 2021-10-06 27931, 2021

      • tandy[m]
      • 2021-10-06 27947, 2021

      • tandy[m]
        monkey: i started :)
      • 2021-10-06 27905, 2021

      • monkey
        Hey awesome ! Tahnks !
      • 2021-10-06 27948, 2021

      • tandy[m]
        im gonna try fix these CI fails now :)
      • 2021-10-06 27905, 2021

      • tandy[m]
        i spotted it, gna fix it
      • 2021-10-06 27934, 2021

      • monkey
        It's getting quite late here, but I'll be able to have a look tomorrow
      • 2021-10-06 27939, 2021

      • monkey
        Thanks for working on that
      • 2021-10-06 27954, 2021

      • tandy[m]
        sounds good :)
      • 2021-10-06 27925, 2021

      • tandy[m]
        ok still have to remove APIService from context, and other refresh token bits, and realised CI is failing because the tests monitor api calls
      • 2021-10-06 27944, 2021

      • Sophist-UK joined the channel
      • 2021-10-06 27945, 2021

      • Sophist-UK has quit
      • 2021-10-06 27945, 2021

      • Sophist-UK joined the channel
      • 2021-10-06 27952, 2021

      • Sophist_UK has quit
      • 2021-10-06 27912, 2021

      • Zhele has quit
      • 2021-10-06 27922, 2021

      • v6lur joined the channel
      • 2021-10-06 27916, 2021

      • aerozol has quit