#metabrainz

/

      • lusciouslover joined the channel
      • minimal has quit
      • pite_ has quit
      • reosarevok[m]
        bitmap: I *think* the reason we keep getting wide character errors when PSQL fails is we're double-decoding in `$exception->throw( sqlstate => $state, message => decode_utf8($msg) );` - does that sound like the likely issue?
      • Maybe I'm doing a dumb
      • Or well, I'm fairly sure that's the problem in some cases, just want to make sure I'm not missing cases where we need that decode :)
      • rcombs has quit
      • rcombs joined the channel
      • Sophist-UK has quit
      • mayhem[m]
        "Mit vorzüglicher Hochachtung," yvanzo sounds like he is standing in front of a judge. :)
      • BrainzGit
        [listenbrainz-server] 14MonkeyDo opened pull request #2934 (03master…listening-now-require-login): LB-817: Disable BrainzPlayer if all sources disabled https://github.com/metabrainz/listenbrainz-serv...
      • rimskii[m]
        lucifer: Hi!
      • So Ive encountered problem with soundcloud. I was trying to do metadata lookup (using this endpoint https://api.listenbrainz.org/1/metadata/lookup/), but soundcloud doesnt store track and artist names like other apps, since mostly the tracks are submitted by random users to soundcloud. So track JSONs doesnt contain artist name lol. They have only title, which is usually, ( but not always) contains artist and track name like this
      • "Sabrina Carpenter - PLease Please Please". So im thinking to what to do in this situation"
      • * lucifer: Hi!
      • So Ive encountered problem with soundcloud. I was trying to do metadata lookup to search mbid by recording_name and artist_name (using this endpoint https://api.listenbrainz.org/1/metadata/lookup/), but soundcloud doesnt store track and artist names like other apps, since mostly the tracks are submitted by random users. So track JSONs dont contain artist name lol. They have only title, which is usually, (but not always) contains
      • artist and track name like this "Sabrina Carpenter - Please Please Please". So im thinking to what to do in this situation"
      • As one way, I can try to divide the track name into two parts, tho it doesnt seem to work for every song
      • rimskii[m]: success rate would be like 60%~
      • * like 60% - 70%~
      • * lucifer: Hi!
      • So Ive encountered problem with soundcloud. I was trying to do metadata lookup to search mbid by recording\_name and artist\_name (using this endpoint https://api.listenbrainz.org/1/metadata/lookup/), but soundcloud doesnt store track and artist names like other apps, since mostly the tracks are submitted by random users. So track JSONs dont contain artist name lol. They have only title, which usually contains artist and track name
      • like this "Sabrina Carpenter - Please Please Please". So im thinking to what to do in this situation"
      • lucifer[m]
        rimskii: hmm i see, can you share one track json?
      • mayhem[m]
        monkey: ansh lucifer : can I use test.lb for a bit?
      • monkey[m]
        I'm not using it
      • lucifer[m]
        sure
      • mayhem[m]
        thx.
      • rimskii[m]
        lucifer[m]: okay! Can I share in about an hour? Not at home rn :(
      • lucifer[m]
        sure no hurry
      • ansh[m]
        mayhem: sure!
      • monkey[m]
        <lucifer[m]> "rimskii: hmm i see, can you..." <- Looking at the live API docs you can get a json sample: https://developers.soundcloud.com/docs/api/expl...
      • Not sure if that does all you want, but...
      • Snooping into the data in the SC page you can also retrieve some json tracks:
      • lucifer[m]
        monkey: yup i have seen that, but i wanted to see the json for that particular track
      • monkey[m]
        See above, indeed this sucks "title": "Sabrina Carpenter - Please Please Please",
      • lucifer[m]
        publisher_metadata
      • has the correct metadata
      • monkey[m]
        If publisher_metadata is available somewhere, it has the artist as a separate field
      • Ya
      • But not the track name
      • lucifer[m]
        that's album title i think.
      • soundcloud doesn't really support albums.
      • monkey[m]
        Right, my bad.
      • Accroding to the API docs, publisher_metadata is not available in the returned JSON :/
      • lucifer[m]
        we had a meet with the soundcloud team and they teat albums as playlists internally so i think in such cases it might be enough to use publisher metadata.
      • oh this is from the website scraping and not the api?
      • monkey[m]
        Yes
      • I remember running into that issue when i first looked at their API
      • 💩
      • lucifer[m]
        hmm i see, maybe we can match just based on artist name + track title for soundcloud.
      • we already do that during search but later only consider it if artist names and track names are similar too respectively.
      • monkey[m]
        Hm so it's specifically for deciding which API search result to play?
      • If so, I recently added a fuzzy matching library for that use case: https://github.com/metabrainz/listenbrainz-serv...
      • lucifer[m]
        <monkey[m]> "Hm so it's specifically for..." <- ah no its for importing playlists from soundcloud to LB.
      • monkey[m]
        I guess fuzzy matching on that end too then...
      • lucifer[m]
        yup of course.
      • monkey[m]
        What a pain XD
      • Someone should really invent a way to uniquely identify artists and such with a simple identifier...
      • lucifer[m]
        XD
      • mayhem[m]
        monkey[m]: that smacks of effort, really.
      • reosarevok[m]
        Nah, that'd require those people to have a big brain for their music
      • Will never happen
      • yvanzo: for SEARCH-728 am I right to assume that the fix is to also look at `unknown_country_dates` inside `convert_release` in `wscompat`?
      • BrainzBot
        SEARCH-728: Releases with no release countries show do not show their release date https://tickets.metabrainz.org/browse/SEARCH-728
      • reosarevok[m]
        I see mbdata has a separate ReleaseUnknownCountry model, which I guess we'd need to use rather than having ReleaseCountry, so that complicates convert_release_event and the like, but AFAICT that's what needs to happen
      • I also cannot find where the CountryDates model is coming from? I don't see it in mbdata
      • Anyway, off to the shop for a bit
      • Left a comment on the issue for now, feel free to expand there if I'm missing something
      • Sophist-UK joined the channel
      • mayhem[m]
        Spotify, I Am Begging You to Let Me Take a Break From Songs https://www.howtogeek.com/spotify-i-am-begging-...
      • Lol
      • Sophist_UK joined the channel
      • Sophist-UK has quit
      • bitmap[m]
        reosarevok: that sounds plausible, were you able to reproduce it?
      • reosarevok[m]
        Well I was, I think, I'm just not sure if there's cases where removing that will cause a problem
      • bitmap[m]
        I'd expect HandleError to receive messages in a consistent encoding from DBIx::Connector
      • BrainzGit
        [listenbrainz-server] 14MonkeyDo opened pull request #2935 (03master…rec-playlist-save-button): LB-1317, LB-1318: Export to music service options on "Created for you" page https://github.com/metabrainz/listenbrainz-serv...
      • [listenbrainz-server] 14MonkeyDo opened pull request #2936 (03master…social-share-image): LB-1572: Add meta tags for share image https://github.com/metabrainz/listenbrainz-serv...
      • pite joined the channel
      • mayhem[m]
        monk
      • monkey: not using test anymore. all yours.
      • monkey[m]
        OK thanks
      • minimal joined the channel
      • theflash__ joined the channel
      • theflash__
        akshaaatt[m]: hey , can you please let me know the UI of the troi-bot notification , to be used in the feed
      • rimskii[m]
        lucifer: here is the track json
      • rimskii[m] posted a file: (53KiB) < https://matrix.chatbrainz.org/_matrix/media/v3/download/matrix.org/AFhlxymZIPNuRTyspdKeJgUq/tracks.json >
      • reosarevok[m]
        <bitmap[m]> "though see https://github.com/..."; <- Oh no, of course it was me :D
      • bitmap[m]
      • Jade[m]
        Go on?
      • bitmap[m]
        was there not an existing messageformat v1 parser for Rust we could have used that made you decide to write your own?
      • Jade[m]
        Unfortunately not
      • ICU4X is conspicuously missing a MessageFormat parser
      • It does have pretty much everything else though, so I've used it in the runtime
      • I haven't committed that yet cause it still needs a few tweaks
      • bitmap[m]
        I see. I figured that was the case, but it surprised me that nobody had written one before
      • Jade[m]
        Yeah. There are a few different projects, but they all have their own syntax
      • akshaaatt[m] uploaded an image: (184KiB) < https://matrix.chatbrainz.org/_matrix/media/v3/download/matrix.org/fJWjMrYqqRQJOEeOeMjLQCCN/1000000856.jpg >
      • akshaaatt[m]
        theflash: this is how the android app handles notifications
      • yvanzo[m]
        Hi yellowhatpro, please let us know when you want to have a meeting again this week.
      • yellowhatpro[m]
        Hi yvanzo , I am available tomorrow
      • yvanzo[m]
        What time so bitmap can be there too?
      • theflash__
        alright!, thanks akshaaatt[m]!
      • yellowhatpro[m]
        wait lemme check according to the clock you told about
      • bitmap: yvanzo 1500 UTC tomorrow ?
      • bitmap[m]
        yes that works for me
      • yvanzo[m]
        Thank you both!
      • mayhem: Almost 😆 I tried to pick the most formal possible salutation as I don’t know if they are/will be looking on us favorably. Let’s hope that they will have a laugh too and develop a liking! 🤞
      • reosarevok: About `unknown_country_dates`, your assumption seems to make sense 👍️ but I didn’t dig the code to check it as a whole.
      • reosarevok[m]
        bitmap: any idea where the encoding problem might be happening? Alternatively, is there a way to check programmatically whether a message is utf8 or not?
      • The problem from MBS-11207 we tried to skip with this I mean
      • BrainzBot
        MBS-11207: Error messages from DBI are badly encoded https://tickets.metabrainz.org/browse/MBS-11207
      • bitmap[m]
        we should try to reproduce both issues to understand what's going on
      • perl does have the concept of a utf-8 flag on scalars which you can check with utf8::is_utf8
      • reosarevok[m]
        bitmap: ok, found a way to reproduce the wide character error
      • If I change
      • INSERT INTO artist_credit_name (artist_credit, position, artist, name, join_phrase)
      • VALUES (1, 0, 1, 'ABBA', ''), (2, 0, 2, 'ABBA', '');
      • In t/sql/work.sql
      • To have nonexistent artist 8
      • Then I correctly get
      • # 23503 DBD::Pg::st execute failed: ERROR: insert or update on table "artist_credit_name" violates foreign key constraint "artist_credit_name_fk_artist"
      • # DETAIL: Key (artist)=(8) is not present in table "artist". [for Statement "SET client_min_messages TO 'warning';
      • But if I replace any of the ASCII strings in that file with, say, ♥
      • Then I get # Wide character at /home/reosarevok/musicbrainz-server/lib/MusicBrainz/Server/Connector.pm line 59. instead
      • (which goes back to the former if I remove the decode_utf8() call)
      • Eh. Both while running prove -lv t/tests.t :: --tests Edit::Work::Create, that is :)
      • bitmap[m]
        reosarevok: if you remove `decode_utf8`, can you still reproduce MBS-11207 using the suggestion in the ticket ("change the hostname for READWRITE to something invalid that has unicode characters in it")?
      • BrainzBot
        MBS-11207: Error messages from DBI are badly encoded https://tickets.metabrainz.org/browse/MBS-11207
      • minimal has quit
      • rain0r joined the channel
      • rimskii[m]
        <lucifer[m]> "hmm i see, maybe we can match..." <- Should I consider using fuzzy matching for this? Im still not sure about how to implement it effectively
      • lucifer[m]
        rimskii: need to think about it more, for now just keep using the same endpoints regardless of the match rate.
      • we can collect some examples of data in soundcloud, what they should ideally match to and how to do that, and discuss it with mayhem later.
      • rain0r
        I'm wondering if track->identifier in JSPF is a list or a string. I found both cases in the ListenBrainz API even if there is only one element in the list?
      • lucifer[m]
        rain0r (IRC): it should be a list of string according to the spec, historically we had it as string but now we are migrating to list of string as well.
      • rain0r
        lucifer[m]: Thank you.
      • BrainzGit
        [musicbrainz-android] 14akshaaatt opened pull request #226 (03main…bump): Update target sdk version and migrate to kts https://github.com/metabrainz/musicbrainz-andro...
      • rain0r
        are the places which have not yet been migrated tracked anywhere?
      • for example: playlist-top-discoveries-for-year still uses a string
      • lucifer[m]
        rain0r (IRC): yes, those playlists were generated a long time back and will likely not be migrated anytime soon.
      • we intend to support both string and list of string in LB/troi for now.
      • BrainzGit
        [musicbrainz-android] 14akshaaatt merged pull request #225 (03main…main): Add a missing space to `Readme.md` https://github.com/metabrainz/musicbrainz-andro...
      • reosarevok[m]
        bitmap: Hmm
      • reosarevok[m] sent a code block: https://matrix.chatbrainz.org/_matrix/media/v3/download/chatbrainz.org/dujsPhhIyDpAKvhLbopejOou
      • I guess so?