Why duration filter not working properly for soundcloud search api?

My Question is almost same of the following link : soundcloud search api ignoring duration filter?

As that link didn't provide a good answer so i question it again .

My problem is : i write a code as like this

<script src="//connect.soundcloud.com/sdk-2.0.0.js"></script>
<script>
SC.initialize({
  client_id: 'YOUR_CLIENT_ID'
});

// find all tracks with the genre 'punk' that have a tempo greater than 120 bpm.
SC.get('/tracks', { genres: 'punk', duration: { from: 15000, to:18000 } }, function(tracks) {
  console.log(tracks);
});
</script>

This give me some tracks which is not between duration 15000 - 18000 .

Did i do anything wrong ?

Can anybody share a sample by using duration filter ?

N.B: Same thing also occur for bpm filter .

Thanks

Answers


maybe something got updated and you are all set.... but I just did this this way.

//setup
 search = {};
 search.q = "timba";
 search.limit = 20;
 search.sortBy = "created_at";
 search.duration = {};
 search.duration.fromSec = 60;
 search.duration.toSec = 480;

//search method
 search.duration.from = search.duration.fromSec*1000;
 search.duration.to = search.duration.toSec * 1000;

SC.get('/tracks', search).then(function(tracks) {
..
..

Have had no issues with the results


Need Your Help

Remove alla files named xxxx under this dir

batch-file

How do I remove all files named xxxx.*.sql under a catalog named src?

Scale text size on Canvas

java android xml

I'm usint this class that provide to draw a cicle with inside a title and subtitle. the code is this (i'm not the author): https://github.com/ylyc/circular_progress_bar/blob/master/src/com/lylc/wid...