Document lohd protocol, please
supki opened this issue · comments
Someone might want to write non-standard loh client (with GUI, for example).
It would require protocol documentation, I don't think it's convenient to look lohd sources up for that.
Take a look, please.
https://github.com/dmalikov/loh/wiki/Lohd-specification
Could lfmConfig JSON encoding be flattened?
Maybe it could be done with some wrapper types over haskell-liblastfm
types.
Thanks!
You are welcome!
Why do we need totalSec
and currentSec
fields?
totalSec
is apparently length of the track for now playing status?
Also, can you please rename
trackInfo
⇒ track
totalSec
⇒ length
track
⇒ title
currentSec
⇒ currentTime
(if that is needed actually)
lfmConfig
⇒ auth
Seems like currentSec
is redundant.
totalSec
is optional for now playing status and scrobble, btw,
It would be better?
{
"track": {
"album": null,
"title": "Sqoocka",
"length": null,
"artist": "Дмитрий Маликов"
},
"type": "Scrobble",
"auth": {
"secret": "c",
"apiKey": "a",
"sessionKey": "b"
}
}
That's what I wanted.