-
-
Notifications
You must be signed in to change notification settings - Fork 73
Remote Control API
Taiko2k edited this page Dec 20, 2020
·
28 revisions
Port used is 7814
API is not stable and subject to change.
API point is /api1/
. So for example full URL would be for example http://localhost:7814/api1/play
(no trailing slash)
Warning: There are currently no notifications of server side data changes. If playlist state changes, existing client playlist data will be invalidated.
- Playlist ID: Identifies a unique playlist. (str)
- Track ID: Identifies a unique track database entry. May appear multiple times in a playlist. (int)
- Album ID: Identifies a block within a playlist. Only unique in the context of a single playlist. (int)
- Position: An index position within a playlist. (int)
-
version
This should increment on breaking changes. Returns json:
{"version": 1}
play
pause
next
back
-
seek/<n>
where <n> is an int in range 0 to 1000. -
start/<Playlist ID>/<Position>
Begins playback in playlist at track index position in playlist.
shuffle
repeat
-
playlists
Returns json:
{"playlists":
[ {"name": "Myplaylist",
"id": "1234",
"count": 123
}, ...
]
}
count
is number of tracks in the playlist
trackposition/<Playlist ID>/<Position>
Returns json of base track data class:
{"title": "",
"artist": "",
"album": "",
"album_artist": "",
"duration": 180000,
"id": 123,
"position": 12,
"album_id": 12,
"track_number": "5"
}
-
tracklist/<Playlist ID>
Returns list of track classes (as above)
{"tracks":
[ ...
]
}
-
albums
Same format as "All tracks", except only the first track of every album block is included.
{"albums":
[ ...
]
}
-
albumtracks/<Playlist ID>/<Album ID>
Same format as "All tracks", Except only the tracks in given album will be returned.
status
{ "status": "stopped",
"shuffle": false,
"repeat": false,
"progress": 0,
"playlist": "123",
"playlist_length": 123,
"id": 123,
"title": "",
"artist": "",
"album": "",
"progress": 120000,
"position": 1,
"album_id": 123,
"track": {...}
-
status
can bestopped
,playing
orpaused
-
id
is a Track ID of currently playing track -
progress
is absolute time in ms -
playlist
is a Playlist ID -
playlist_length
is a count of tracks in the playlist -
position
is index position of playing playlist
pic/small/<Track ID>
pic/medium/<Track ID>
Returns image file
-
playinghit/<Track ID>
Causes play time to increment. Hit continuously while playing. Period must be less than 5 seconds.
file/<Track ID>
Return raw audio file. Network tracks not supported. CUE sheets not supported.