WritheM / Wallace

https://plug.dj/writhem-radio
Other
4 stars 3 forks source link

Proxy Plug website #51

Open ylt opened 9 years ago

ylt commented 9 years ago

This a short cut to getting basic management before #50 is implemented. Playlist management is currently not possible, and the best interface is plug itself.

An easy solution for this would be to proxy plug itself. All API calls are using relative URL's except for the websocket which is given in page itself (which can be modified while serving it).

The main complexity is that Wallace is using an API which abstracts away the underlying protocol. We need to catch all the http requests and the websocket requests and call the relevant methods on the Plugged API. Anything not handled, we can just pass on to the web API directly by using the cookie jar - this however runs the risk of Plugged not being synchronised with the current state.