https://library.ibroadcast.com
The library server stores the user's music library.
The library is returned in JSON format, like all other responses. It contains the following keys:
tracks
albums
artists
playlists
tags
trash
status
Normally, each key consists of a dictionary whose keys are IDs of each item. Each item is an array. Inside each library key is a map object, which binds each array's items to a name.
For example, here is what the albums key might look like:
"albums": {
"78903103": [
"Digital Guilt",
[
211504300
],
22917502,
false,
0,
0,
2013
],
"map": {
"rating": 4,
"artist_id": 2,
"year": 6,
"tracks": 1,
"disc": 5,
"trashed": 3,
"name": 0
}
},
In this case, to get the name of the album with the ID of 78903103, you would do the following:
var albumName = library.albums["78903103"][library.albums.map["name"]];
The only exception to the above format are tags. Each tag is a dictionary instead of an array and there is no map:
{
"455976": {
"name": "Test Tag",
"archived": false,
"tracks": []
}
}
Here is a complete library object with 1 album, 1 artist, 1 track, 1 playlist, and 1 tag:
{
"artists": {
"22917502": [
"Zoe.LeelA",
[
211504300
],
false,
0
],
"map": {
"name": 0,
"tracks": 1,
"trashed": 2,
"rating": 3
}
},
"tags": {
"455976": {
"name": "Test Tag",
"archived": false,
"tracks": []
}
},
"tracks": {
"211504300": [
1,
2013,
"Pop Up",
"Pop",
105,
78903103,
160155,
22917502,
0,
"2021-02-17",
false,
2573544,
"",
"",
0,
0,
"/128/74c/fdd/10026629",
"audio/mpeg3",
"-7.9",
"18:42:39"
],
"map": {
"length": 4,
"track": 0,
"uploaded_time": 19,
"enid": 8,
"rating": 14,
"path": 12,
"uid": 13,
"title": 2,
"trashed": 10,
"type": 17,
"replay_gain": 18,
"artwork_id": 6,
"genre": 3,
"file": 16,
"plays": 15,
"year": 1,
"album_id": 5,
"uploaded_on": 9,
"artist_id": 7,
"size": 11
}
},
"expires": 1645123362,
"playlists": {
"329378": [
"Starter Songs",
[
211504300
],
1234,
false,
null,
null,
null,
null,
0
],
"map": {
"artwork_id": 7,
"sort": 8,
"uid": 2,
"tracks": 1,
"description": 6,
"system_created": 3,
"name": 0,
"public_id": 4,
"type": 5
}
},
"trash": {
"0": [
"Trash"
],
"map": {
"name": 0,
"tracks": 1
}
},
"albums": {
"78903103": [
"Digital Guilt",
[
211504300
],
22917502,
false,
0,
0,
2013
],
"map": {
"rating": 4,
"artist_id": 2,
"year": 6,
"tracks": 1,
"disc": 5,
"trashed": 3,
"name": 0
}
}
}
To get the user's library, make a request to library.ibroadcast.com. The resonse will contain the user's library.
{
"library": { // library object }
}
To check if the library is up to date, make a status request and compare the returned status.lastmodified timestamp to the timestamp that was returned the last time the library was requested.
if (statusResponse.status.lastmodified != library.status.lastmodified) {
// Request new library from library.ibroadcast.com
}