#metabrainz

/

      • PrathameshG13 joined the channel
      • yvanzo
        reosarevok, bitmap: Slightly related to API docs, does MBS-12093 seem reasonable to you?
      • BrainzBot
        MBS-12093: API endpoints for entity attributes https://tickets.metabrainz.org/browse/MBS-12093
      • monkey
        Gah, thanks Apple.
      • PrathameshG has quit
      • alastairp
        monkey: to be fair, it's not like it was registered in the public ports database as "for LB use only" either ;)
      • monkey
        For what it's worth, I'm in favor of the change to 8100 (or whatever port is free and generally available)
      • PrathameshG13 has quit
      • PrathameshG joined the channel
      • PrathameshG
        Got it, thanks for the help!
      • But for some reason its not taking the input.
      • Also, I should mention that I havent setup my local development environment yet πŸ‘
      • Oh nvm, it worked somehow
      • yvanzo
        reosarevok: The rebased PR has conflicts on PaginatedResults.js
      • gcrkrause3 joined the channel
      • reosarevok
        Hmm. Wonder why it didn't complain
      • Will check
      • PrathameshG has quit
      • Oh, or maybe it's just new ones
      • Yeah. Rebased again, yvanzo :)
      • PrathameshG joined the channel
      • treeshateorcs[m] joined the channel
      • treeshateorcs[m]
        hello, everyone. i can't set up a development environment for listenbrainz. it raises an exception https://0x0.st/o-nB.png
      • i did everything according to the readthedocs page
      • lucifer
        treeshateorcs[m]: uhh, sorry that looks like one of my recent patches gone wrong. i'll try to fix it soon.
      • outsidecontext: will look into it.
      • treeshateorcs[m]
        oh, sure! can't wait. thank you
      • outsidecontext
        lucifer: thanks. it just rather randomly imported a single listen again. Interestingly I had paused playback for a while, started again. The very first listen got imported, but the rest fails again
      • PrathameshG
        Alrighty, another roadblock.
      • I dont think this script can be run on windows
      • I tried running it on gitbash, but its giving errors
      • Trying powershell now.
      • lucifer
        you'll need docker installed PrathameshG.
      • so WSL
      • PrathameshG
        lucifer: yes, I've installed docker.
      • Ah crap. Havent initialized docker yet
      • *WSL yet
      • lucifer
        docker for linux right?
      • PrathameshG
        I am on windows, so I've installed docker for windows. I havent completed the WSL2 setup yet
      • lucifer
        right windows docker has 2 modes, 1 for linux other for windows.
      • PrathameshG
        I think my 4GB RAM laptop's gonna die by the end of all this 😭
      • @luci
      • lucifer
        oh yeah docker/WSL is very memory intensive :(
      • PrathameshG
        lucifer: is there a way to get it running without WSL? I need as little overhead as possible
      • I can try doing it all in linux dual boot as well, but damn that's gonna take some time to get setup.
      • lucifer
        don't think so its possible without WSL. there used to be a docker app for that but afaik its even more memory consuming.
      • PrathameshG
        yea I directly downloaded the docker app for windows from their site. Is that a bad news?
      • also, by WSL, do you mean enabling WSL and then directly installing docker only in WSL?
      • lucifer
        install wsl, then install docker, it has docs on site how to make it work with WSL.
      • PrathameshG
        On it
      • lucifer
        but if you can dual boot, definitely do it,
      • PrathameshG
        looks like the best way to get around it TBH. It's gonna be more resource efficient than windows anyway.
      • The only problem is that half of my stuff doesn't run well with linux πŸ˜‘
      • PrathameshG36 joined the channel
      • treeshateorcs[m]
        PrathameshG: give wine a try
      • PrathameshG36 has quit
      • PrathameshG has quit
      • PrathameshG12 joined the channel
      • PrathameshG12
        treeshateorcs[m] wine's great, but such a hassle to setup. I also found a snap for foobar2000, but it comes with its own set of problems
      • I'd love to continue using linux, but goddamn it creates a ton of compatibility problems
      • treeshateorcs[m]
        deadbeef on linux has kinda the same feel as foobar
      • PrathameshG12
        The biggest Problem is that I cant use anything otherthan foobar2000 due to my crackhead modified setup (especially the stuff with last.fm)
      • No other player provides such field mappings for last.fm afaik
      • If you know any, please let me know I'd be happy to moveπŸ‘€
      • treeshateorcs[m]
        you may try your luck with cmus and cmusfm (both are open source, so you can edit the cmusfm's source code to match your requirements, it's a smol program)
      • but let's not offtop too much
      • PrathameshG12
        oh right. Forgot this is not discord lol
      • bitmap
        asubedy: hi, a SQL query is the only way to get recently-added releases at the moment. to get an MBID you need some kind of metadata to search for; we have a search API at https://wiki.musicbrainz.org/MusicBrainz_API/Se... or if you have direct database access you can of course just do a SQL query for that too
      • EyePulp joined the channel
      • EyePulp
        Howdy; Querying the musicbrainz API for recordings with a certain word in `recording` key, and when using offsets to loop thourhg pages of results we get back a whole lot more than the `count` value sent by the result. We seem to get a lot of dupes, too, judging by the recording id value. Any suggestions on how to improve? I'll post the query in a sec
      • reosarevok
        bitmap: hi! looking at https://github.com/metabrainz/musicbrainz-serve... again - when you suggest doing all with SQL, would that still involve doing the cursor stuff, but just running SQL deletes instead of $c->model('Editor')->delete?
      • v6lur joined the channel
      • bitmap
        reosarevok: that's correct, the cursor stuff is still needed to keep each delete in its own transaction
      • reosarevok
        Ok :)
      • CatQuest
        cursors?! oh no.
      • EyePulp
        So when I get this back in a query: {"created":"2022-01-17T17:26:09.742Z","count":272,"offset":0,"recordings":[...]...} What does the "count" key represent? number of total items (recordings) in this case matching the result, or total number of pages of results at whatever the "limit" is?
      • reosarevok
        IIRC it's total items, but IIRC also someone complained recently that the search server didn't keep the order with offset...
      • yvanzo, do you remember?
      • EyePulp
        Also hello, and thanks for your help and any work you do related to the MB db & API. =)
      • The second question -- why do I get a lot of repeated "id" values for recordings in the results? I think even within a single page's worth, there are dupes. Is there a way to force DISTINCT on id or something along those lines?
      • bitmap
        EyePulp: can you link to the query you're seeing this behavior on?
      • EyePulp
        @bitmap I'm fine posting an example here if that's acceptable, or a gist if preferred
      • asubedy
        <bitmap> "asubedy: hi, a SQL query is..." <- Oh ok then there would be no way to get the recently added releases on the MB revamp without actually connecting it with the database // akshaaatt
      • So can we do this, instead of recently added releases we can show cover arts of the most listened musics, for which I guess there is an API or something like it through ListenBrainz. (I saw in the chat earlier). Any suggestions on this?
      • EyePulp
      • bitmap
        EyePulp: thanks, just the URL is fine
      • reosarevok
        bitmap: what about stuff like $self->c->model('Editor')->unsubscribe_to($editor_id); ?
      • Run those as code or as SQL?
      • (to remove other people's subscription to this editor)
      • I don't expect many to exist, but :)
      • CatQuest
        fish
      • reosarevok
        Or $self->c->model('EditorLanguage')->delete_editor($editor_id);
      • bitmap
        I'd personally prefer SQL for everything for clarity
      • reosarevok
        Ok
      • akshaaatt
        Again asubedy, the revamp repo is not official but I do like that idea. I would be fine with adding that there, nice learning.
      • CatQuest
        squilfish
      • bitmap
        EyePulp: if I do offset=271 for that I only get one result
      • you said you are getting more than `count` somehow? I guess from the duplicates?
      • EyePulp
        @bitmap is the count the total number of pages then?
      • bitmap
        it's the total number of results
      • reosarevok
        CatQuest: sunfish?
      • CatQuest
        moonfish!
      • fish!
      • reosarevok
        bitmap: Hmm, I think we're not checking whether their collections have any collaborators - not that that is a likely case
      • bitmap
        EyePulp: so to get the next page you should increment offset by the limit (50)
      • EyePulp
        @bitmap Ah! offset isn't a page offset but individual result counts.
      • bitmap
        yup
      • yvanzo
        EyePulp, cc reosarevok: yes, total items. The issue about order with offset is SEARCH-667
      • BrainzBot
        SEARCH-667: Missing Release Groups and Inconsistent Responses when Searching Official Release Groups for Artist via API https://tickets.metabrainz.org/browse/SEARCH-667
      • bitmap
        I think any inconsistencies you'd see otherwise are in theory due to index updates
      • reosarevok
        bitmap: I think if the collections are empty, it should be fine to delete any collaborators as well, or would you rather I checked there are none in the query and left those unremoved?
      • bitmap
        hmm. if they are empty I think it's fine to delete...especially since it'd have to match all these other criteria for the editor being empty, which should be rare
      • reosarevok
        Hmm, although I think our idea earlier was "the collections are untouched"
      • So maybe we should discard collaborator ones. I expect the number difference will be 0 or 1 at most...
      • bitmap
        yea, I think it will hardly matter either way, so whatever you prefer
      • EyePulp
        @bitmap - beautiful! results are matching expectations now! Thanks so much for the clarification.
      • bitmap
        cool, glad it's working now!
      • Shubh has quit
      • Freso
        <BANG>
      • It’s Martin Luther King, Jr. Monday!
      • I have received no mailed in reviews or notices of people outside the usual crowd who want to give review, so… people up for reviews: lucifer, monkey, reosarevok, bitmap, akshaaatt, zas, alastairp, mayhem, yvanzo, CatQuest, Freso – anyone else who wish to give review, let me know ASAP. :)
      • lucifer: Go!
      • CatQuest
        woa
      • oh
      • lucifer
        hi all!
      • EyePulp has his world rocked by IRC with embedded media stills
      • i worked on seeking and implementing feedback on various already open PRs last week. we deployed the long due listen user id PR. and started work on the next steps.
      • another long due PR to fix listen counts in LB also progressed along nicely. other than that, worked on a few improvement of the artist origins map. when hovering over the country, it now shows the artists name as well.
      • finally some misc bug fixes and discussions. fin.
      • monkey: next?
      • monkey
        Hi everyone !
      • Happy new year !
      • I just started working again today, so don't have a lot to say about the past three weeks. I was vacationing in the US, got married, caught covid again, managed to get back after more delays.
      • Before the holidays, I mostly worked on the Year in Music project.
      • This week, docs for BB!
      • That's it for me, bitmap go !
      • bitmap
        hey
      • last week I was mainly working on speeding up area-related queries for the website, since we've been getting alerts about those pages causing excess load
      • my plan is to bring back area_containment, which was previously a view, but will be brought back as a materialized table. (those have worked amazingly for the artist pages)
      • I have most of the triggers done and am writing pgtap tests now
      • reosarevok
        Ooh, neat
      • bitmap
        other than that that, I opened a couple other PRs to fix spammy warnings in our website container logs, and to remove support for Amazon cover art as decided last year (which lets us delete a ton of code, woohoo)
      • that's about it I think...fin, go reosarevok
      • reosarevok
        Hi! I was on holiday and traveling for most of the week
      • Freso
        (People still up: akshaaatt, zas, alastairp, mayhem, yvanzo, CatQuest, Freso – anyone else who wish to give review, let me know ASAP. :))
      • reosarevok
        Then I worked on a few easy tickets created while I was away
      • And now looking into some changes to the MBS-9356 script so we can run it