Skip to content

Tracklist importer

gordielachance edited this page Sep 1, 2020 · 9 revisions

How to import a tracklist ?

WP Soundsystem can import a remote playlist and even keep it synced with its source. We do support a lot of external services like Spotify, Deezer, Last.fm, and even regular HTML webpages. The list of supported services is available here.

For instance, you could create a playlist from the songs history displayed on a radio station's website, and have it updated every 10 minutes. Those auto-refreshing playlists are called radios within our plugin.

Importing a playlist might seems difficult to accomplish on the first time, but in fact it's quite easy.

  • go to music > radios > add new.
  • in the tracklist importer metabox, paste the URL of your playlist, then save the post. Note that importing remote playlists requires a premium account. Free users can still import local files.
  • when reloading, your tracklist should be imported.
  • If you don't need the radio features (stay synced with te remote source), you can now convert the radio to a static playlist by clicking the stop sync button under the tracklist header of the radio.

Importers

We do support importing tracklists from various services. including Spotify, Last.fm, Deezer, Musicbrainz...
They all have some specificities and limitations.

Spotify

Imports are currently limited to 100 tracks, even if we might be able to fix this soon. It is technically possible to import all tracks but this would require some work.

Advanced Settings

Most of tracklists (from Spotify, Deezer, XSPF, and many more) will be imported without any user action, but some documents will require you to fill some settings that will be used to fetch the tracks.

You will need to fill selectors for HTML,JSON and XML documents, and the way those selectors are formatted depends of their Content-Type.

  • HTML: use a CSS (or an XPATH) selector, for example:
  • Playlist
    • Tracks Selector
      • Path: .section-cqct .row .square-item
  • Tracks
    • Artist Selector
      • Path: .title .name
    • Title Selector
      • Path: .title .description

With HTML content, an extra attribute selector field will be available after the path selector (if you use CSS).

  • XML: use an XPATH selector, for example:
  • Playlist
    • Tracks Selector
      • Path: //playlist//trackList//track
  • Tracks
    • Artist Selector
      • Path: .//creator
    • Title Selector
      • Path: .//title
  • JSON: use a list of comma-separated keys, for example:
  • Playlist
    • Tracks Selector
      • Path: items,tracks
  • Tracks
    • Artist Selector
      • Path: artists,0,name
    • Title Selector
      • Path: name
Clone this wiki locally