info-beamer / package-livestream

Experimental package based on streamlink. Should be able to stream youtube, twitch and others.
https://info-beamer.com/pkg/6915
Other
1 stars 5 forks source link

Small discrepancy in api endpoint #1

Closed jreusch closed 4 years ago

jreusch commented 4 years ago

Hey hey

https://github.com/info-beamer/package-livestream/blob/master/control.html sends channel-up/down events via api to the device/{id}/node/root/remote/key endpoint. ib.sendCommand("remote/key", "channel-up");

in the receiving side it reacts to all which is send to /remote/ https://github.com/info-beamer/package-livestream/blob/master/node.lua#L84

is this by intention? should it be accessible via /remote or via remote/key only?

the intention behind this clarification: i would like to add an additional endpoint (seperat issue) to be able to choose channels directly (via name and/or position in list). this could either be done via device/{id}/node/root/remote/channel/name -> data={channel.name} and device/{id}/node/root/remote/channel -> data={channel.id}

or via a complete own endpoint device/{id}/node/root/channel/name -> data={channel.name} [...]

but what choices would be available there depend on if this here will be changed or not. :) thanks!

dividuum commented 4 years ago

Nice catch. That's not intended. Feel free to rewrite as you see fit as long as the current features continue to work. My suggestion while we're reworking would be:

Path Data
channel/up empty
channel/down empty
channel/name channel name
channel/id channel index/id