question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sanitize Bandcamp origin_url field

See original GitHub issue

Describe the bug I noticed that listens submitted to ListenBrainz can have very long URLs full of Bandcamp-specific query parameters.

How to reproduce Search for an album name and click on the result. Start playing the album. Here is an example of the type of originURL sent to ListenBrainz in the track_metadata: "origin_url": "https://yidmusic.bandcamp.com/album/space-klezmer?from=search&search_item_id=266395793&search_item_type=a&search_match_part=%3F&search_page_id=2321371749&search_page_no=0&search_rank=2&logged_in_menubar=true"

I have only checked with the Bandcamp connector and submitting to LB, but the same could apply to other connectors.

Expected behavior I would expect a URL stripped of the query parameters like so: "origin_url": "https://yidmusic.bandcamp.com/album/space-klezmer"

Environment (please complete the following information)

  • OS: Mac
  • Browser: Brave (Chromuim)
  • Extension version: 2.82.1

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
inversecommented, Dec 12, 2022

Found the issue - by default we take the full URL - this kinda makes me wonder if we should by default on all connectors exclude everything in the query string.

I could imagine that might cause some invalid data for you though since I’m sure there are some services which use that?

0reactions
inversecommented, Dec 13, 2022

Indeed - but I am trying to think of what would be better.

The example found with Bandcamp looked like some internal analytics for tracking where folks came from.

But I could imagine also cases where folks run similar campaigns from other platforms - would be quite a significant effort to go through each connector though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Temporary Residence Ltd. - Bandcamp
Stations Field Works · Scarlet Holliday ... Prince Avalanche: An Original Motion Picture Soundtrack ... Take Refuge In Clean Living
Read more >
Warp Records - Bandcamp
Bright Green Field Squid. Yasuke Flying Lotus ... Uncut Gems - Original Motion Picture Soundtrack Daniel Lopatin ... Clean Pit & Lid Disjecta....
Read more >
Bandcamp
Our app gives you instant, unlimited streaming of your Bandcamp purchases, lets you explore a vast catalog of music by artists from every...
Read more >
Clean | Thought Forms - Bandcamp
One time vinyl pressing of "Clean" (275 copies in existence) housed in a reverse board sleeve complete with DIY insert. This comes in...
Read more >
The Last Campfire Soundtrack | Paul Weir ... - Bandcamp
The soundtrack is quirky and uplifting, wistful and hopeful. "The environments, characters and everything about the Last Campfire are so clean, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found