listenbrainz-server icon indicating copy to clipboard operation
listenbrainz-server copied to clipboard

LB-1495: lb-radio endpoint is affected by letter case

Open ericd23 opened this issue 11 months ago • 1 comments

Problem

Basically, upper case tag won't do anything. For example: https://api.listenbrainz.org/1/lb-radio/tags?tag=Jazz&begin_percent=0&end_percent=50&count=50 gives 0 results. It's because PG's WHERE clause is case-sensitive.

Solution

Convert all tags into lower case when loading the query params. Also add a integration test for this endpoint.

ericd23 avatar Mar 18 '24 02:03 ericd23

Hello @ericd23! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2024-03-18 03:01:51 UTC

pep8speaks avatar Mar 18 '24 02:03 pep8speaks

I feel that this isn't a problem that should be fixed in ListenBrainz, its a troi problem. I've fixed this in troi, so closing this PR. Thanks for submitting the PR, much appreciated!

mayhem avatar Apr 23 '24 10:04 mayhem