Node Soundcloud Downloader Versions Save

A SoundCloud API v2 wrapper for Node.js

v1.0.0

3 years ago

Pagination Support for Likes

Pagination for likes was previously achieved with the limit and offset parameters, but it seems to be no longer working with SoundCloud's API. I've revamped the GetLikesOptions object used by scdl.getLikes() to accommodate these new changes.

Additionally, I've also automated the entire pagination process so that it can be executed with a single invocation of scdl.getLikes(). (In the past you had to change limit and offset and call it multiple times)

const likes = await scdl.getLikes({
  profileUrl: 'https://soundcloud.com/uiceheidd',
  limit: 200 // Will retrieve at most 200 liked tracks
})

const allLikes = await scdl.getLikes({
  profileUrl: 'https://soundcloud.com/uiceheidd',
  limit: -1 // Will retrieve all liked tracks
})

v0.2.4

3 years ago

New

Options for scdl.search()

You can now invoke scdl.search() with a SearchOptions object which changes the behaviour of the fuction:

const querySearch = await scdl.search({ 
  query: 'sdfjdksf',
  resourceType: 'tracks',
  limit: 100, // How many items to return, defaults to 10 if not specified
  offset: 0 // How many items to offset by (used for pagination), defaults to 0 if not specified
})

// Get the next page of data:
const nextPage = await scdl.search({
  nextHref: querySearch.next_href
})

URL utility functions

isPlaylistURL, isPersonalizedTrackURL, and isFirebaseURL can be used to determine the type of an input url.

v0.2.3

3 years ago

New

Added support for mobile SoundCloud URLs. This allows the package to use URLs copied from SoundCloud's mobile web version, or their mobile app. There are two types:

  • Regular mobile: https://m.soundcloud.com/XXXXXX/XXXX (these are copied from a mobile browser)
  • Firebase URL: https://soundcloud.app.goo.gl/XXXXXXXX (these are copied from the SoundCloud mobile app)

The SCDL class is configured to support these types of URLs by default.

Converting mobile URLs is an inexpensive process, but it may be favourable to disable conversion of Firebase links because they require an HTTP Get request and parsing of the HTML response to find the regular URL. If you wish to disable this behaviour, you may instantiate a custom SCDL class with the appropriate options object:

const scdlCreate = require('../').create

const scdl = scdlCreate({
  stripMobilePrefix: false, // Will not convert mobile URLs to regular URLs
  convertFirebaseLinks: false, // Will not convert Firebase URLs to regular URLs
})

Additionally, you may configure an existing SCDL instance to disable this behaviour by modifying the SCDL.stripMobilePrefix and SCDL.convertFirebaseLinks properties:

const scdl = require('../').default

scdl.stripMobilePrefix = false
scdl.convertFirebaseLinks = false

v0.2.2

3 years ago

Fixed

  • Fixed issue with limit parameter in getLikes()
  • Updated dependencies

v0.2.1

3 years ago

Notice

There are new exports in the package which means if you are using the package as CommonJS module you must do the following:

const scdl = require("soundcloud-downloader").default

New

Fixed

  • getSetInfo() not returning tracks in the correct order.
  • getSetInfo() not returning private tracks for private playlists.

v0.2.0

3 years ago

New

  • Client ID can now be saved to file if environment variable SAVE_CLIENT_ID=true

Fixed

  • Fixed getSetInfo() not working for playlists with track count > 55

v0.1.8

3 years ago
  • Fixed getSetInfo() not working for playlists with <5 tracks
  • Added downloadPlaylist()
  • Added setAxiosInstance(), this allows you to set a custom instance of Axios configured with settings that the module will use

v0.1.6

3 years ago
  • Removed type parameter from scdl.related() (it only works for tracks)
  • Fixed some Typescript documentation errors/inconsistencies

v0.1.5

3 years ago
  • Added scdl.search(type: SoundcloudResource | 'all', query: string, clientID?: string) which returns results for searching for a track, playlist, user, or album.

  • Added scdl.related (type: SoundcloudResource, id: number, limit: number, offset = 0, clientID?: string) which finds related tracks/playlists/users/albums.

  • Removed full parameter from scdl.getSetInfo(), the function now uses a much more efficient way of fetching info for the tracks of a playlist and does so by default.

  • scdl.getTrackInfoByID() can now fetch info for multiple tracks, (id parameter type is now an array of numbers)

v0.1.4

3 years ago
  • Added getSetInfo(url: string, clientID?: string) (v0.1.3)
  • Added getTrackInfoByID(id: number, clientID?: string)
  • Updated getSetInfo(url: string, full = false, clientID?: string) so that it retrieves track information for all tracks in the set if parameter full is set to true