-
-
Notifications
You must be signed in to change notification settings - Fork 100
Remote Control API
Taiko2k edited this page Sep 9, 2022
·
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)
- 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)
-
versionThis should increment on breaking changes. Returns json:
{"version": 1} playpausenextback-
seek/<n>where <n> is an int (time in ms) in range 0 to duration of playing track. [Added in v6.6.0] -
seek1k/<n>where <n> is an int in range 0 to 1000. -
setvolume/<n>where <n> is an int in range 0 to 100. -
setvolumerel/<n>Relative adjustment where <n> is an int in range -100 to 100. [Added in v6.6.0] -
start/<Playlist ID>/<Position>Begins playback in playlist at track index position in playlist.
shufflerepeat
-
playlistsReturns json:
{"playlists":
[ {"name": "Myplaylist",
"id": "1234",
"count": 123
}, ...
]
}-
idis a Playlist ID -
countis 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",
"can_download": true,
"has_lyrics": false
}-
idis a Track ID -
durationis in ms -
track_numbermay be alphanumeric -
can_downloadis true if you can download usingfilepoint
-
tracklist/<Playlist ID>Returns list of track classes (as above)
{"tracks":
[ ...
]
}-
albums/<Playlist ID>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",
"inc": 12345,
"shuffle": false,
"repeat": false,
"playlist": "123",
"playlist_length": 123,
"id": 123,
"title": "",
"artist": "",
"album": "",
"progress": 120000,
"auto_stop": false,
"volume": 50,
"position": 1,
"album_id": 123,
"track": {...}-
statuscan bestopped,playingorpaused. -
idis a Track ID of currently playing track. -
progressis absolute time in ms. -
volumeis an int in range 0–100. -
playlistis a Playlist ID. -
playlist_lengthis a count of tracks in the playing playlist. -
positionis index position in the playing playlist. -
incis an integer that increases when server side playlist or track data is modified. Therefore if this variable changes then you should consider any cached client side data to be invalidated.
pic/small/<Track ID>pic/medium/<Track ID>
Returns image file as JPG. Small is max 75x75. Medium is max 1000x1000. Size and aspect ratio may vary.
lyrics/<Track ID>
Returns JSON
{"track_id": 1234,
"lyrics_text": "Song lyrics go here, or empty string if none"
}-
file/<Track ID>Return raw audio file. Network tracks not supported. CUE sheets not supported. You can check thecan_downloadtrack property. -
playinghit/<Track ID>Causes play time to increment. Hit continuously while playing. Period must be less than 5 seconds. A period of 3 seconds is suggested.