azlux/botamusique

Play a file by path using the web interface

Closed this issue · 2 comments

Hello,
I'm using the web interface to programmatically play music using the HTTP endpoints.

However, I don't see any possibility to queue/play a file directly by only using the path - just by the internal ID even though this is implemented as a Mumble command.

Is there any chance that you could implement this?

First, as you have already experienced working with our HTTP APIs, you may feel that they are very messy. Indeed, at some point in the past, we have a detailed proposal to rehaul the API system and adapt RESTful API but we don't have enough time to implement that. However, I'm sure this will be done some day.

Back to your question, I think the procedure of adding a song should be querying it first, then adding it the playlist. We have a /library endpoint that take queries. I think you can just try posting

{
    "action": "query",
    "type": "file",
    "dir": "{your dir}"
}

And selecting the id of the music file you want from the query result.

This is not ideal, but certainly given that we are going to rework the APIs, I won't spend too much time adding new features to the current APIs.

Alright, thanks for the information! 👍🏻