What is the difference between `name` and `namesearch` in /v3.0/tracks?

48 views
Skip to first unread message

Eric Robinson

unread,
Aug 1, 2019, 3:27:36 PM8/1/19
to jamendo-dev
The following two fields are available in the Parameter List of the /v3.0/tracks API:
  1. name: A track name
  2. namesearch: Search a track by name (track_name matching *searchquery*). You must provide an UTF-8 string
Can somebody please explain how these two parameters should be used?


Our goal is to find tracks that match a specific name+artist pairing. We've been testing this with content returned by Jamendo directly (simply resubmitting the values back to the search). What we've found is this:
  1. name: Falls down (fails) on non-alphanumeric characters. Example track names:
    1. Fool's Gold
    2. Háblame - (Talk to me)
    3. М-2 ft Бастион при уч Даша- Love Story (online-audio-converter.com)
    4. ØTIN - Oceans
  2. namesearch: Works on all of the above titles but requests return way too many results. One would expect that the third option would be singular in the Jamendo library (especially when the artist_name is also specified), but we actually see 5448 results?!
Can someone please explain what's going on here? How are we expected to properly make use of the name and namesearch parameters?

Eric Robinson

unread,
Aug 1, 2019, 6:11:21 PM8/1/19
to jamendo-dev
Correction
A correction is in order here:

  1. name: Falls down (fails) on non-alphanumeric characters. Example track names:
    1. Fool's Gold
    2. Háblame - (Talk to me)
    3. М-2 ft Бастион при уч Даша- Love Story (online-audio-converter.com)
    4. ØTIN - Oceans

This is only true and do you do what we did: replace all non-alpha-numeric characters with a space character.

"But why would you do that?!" I hear you shout.

Well, we would do it when we run some tests that show that a few songs with a raw & character in the title don't work. Doing the following:

const newName = name.replace(/\W+/gi, " ");

allowed the troublesome tracks to work with the name field. What we didn't realize until more recent testing, however, was that it also broke for the examples I gave in the initial post.

The Actual Issue
But this brings us back to "raw '&' characters in the title break the name filter field!"

Here are some example tracks that have this problem:
What's extremely confusing about this is that this problem isn't obvious. The issue does not appear for these tracks:
The difference is in how the '&' character is encoded/handled by the Jamendo server. Let's take a look at the raw data for the problematic three above:
  1. Boys, Girls, Toys & Words
  2. Boys & Girls in Ibiza
  3. SR feat Anastika - You & I
And now the raw data for the working three:
  1. Clap & Stomp Perscussion
  2. Sweep Bubb - Logo & Intro
  3. sex & love
The difference appears to be in how the '&' character is encoded. From the look of the raw data (both name and artist_name, at least) appear to expect it to be encoded as '&amp'. The top three examples DO NOT have that encoding and therefore break the lookup: they can't be round-tripped through the Jamendo API system.

For now, simply removing them with the following code appears to allow the name field to resolve properly:

const newName = name.replace(/& /g, "");

Is this expected? If so, can it be added to the documentation?

If not, can this be addressed on the server/database side?

Eric Robinson

unread,
Aug 1, 2019, 6:35:54 PM8/1/19
to jamendo-dev
On a related note, we stumbled across this track which has an artist name of simply "&" (behind the scenes this is "properly" encoded as "&").

The API appears to properly resolve the lookup but the website struggles with that artist name.

I take it this isn't expected?

Vivien Genet

unread,
Aug 2, 2019, 2:31:50 AM8/2/19
to jamen...@googlegroups.com
Hi Eric,

I don’t have your first problem about the “name” parameter:



What is your exact query?

Thanks.


Vivien Genet                                                               

V.P. of Engineering
Tel: +352 26 53 421
76 avenue de la Liberté L-1930 Luxembourg




 
Artists. Music. Licensing.

--
You received this message because you are subscribed to the Google Groups "jamendo-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jamendo-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jamendo-dev/05ef1cf2-ece2-4e72-a2ed-659f1175ca6f%40googlegroups.com.

Eric Robinson

unread,
Aug 2, 2019, 5:34:27 AM8/2/19
to jamen...@googlegroups.com
Hi Vivien,

Please see the follow up two messages to that initial post. The issue was initially mis-represented, but cleared up in the second post.

It seems you may have only seem my first post?

- Eric

On Aug 2, 2019, at 2:31 AM, Vivien Genet <viv...@jamendo.com> wrote:

Hi Eric,

I don’t have your first problem about the “name” parameter:
<Capture d’écran 2019-08-02 à 08.30.30.png>



What is your exact query?

Thanks.


Vivien Genet                                                               

V.P. of Engineering
Tel: +352 26 53 421
76 avenue de la Liberté L-1930 Luxembourg


<image003.png>


 
Artists. Music. Licensing.

Le 1 août 2019 à 21:27, Eric Robinson <er...@sonicbloomgames.com> a écrit :

The following two fields are available in the Parameter List of the /v3.0/tracks API:
  1. name: A track name
  2. namesearch: Search a track by name (track_name matching *searchquery*). You must provide an UTF-8 string
Can somebody please explain how these two parameters should be used?


Our goal is to find tracks that match a specific name+artist pairing. We've been testing this with content returned by Jamendo directly (simply resubmitting the values back to the search). What we've found is this:
  1. name: Falls down (fails) on non-alphanumeric characters. Example track names:
    1. Fool's Gold
    2. Háblame - (Talk to me)
    3. М-2 ft Бастион при уч Даша- Love Story (online-audio-converter.com)
    4. ØTIN - Oceans
  2. namesearch: Works on all of the above titles but requests return way too many results. One would expect that the third option would be singular in the Jamendo library (especially when the artist_name is also specified), but we actually see 5448 results?!
Can someone please explain what's going on here? How are we expected to properly make use of the name and namesearch parameters?

--
You received this message because you are subscribed to the Google Groups "jamendo-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jamendo-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jamendo-dev/05ef1cf2-ece2-4e72-a2ed-659f1175ca6f%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "jamendo-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jamendo-dev...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages