TS3AudioBot
TS3AudioBot copied to clipboard
Get song picture via api
Is your feature request related to a problem? Please describe. I create a whole music player in the interface. I could for sure use also the api to get the youtube picture that display the current play but is it possible to get the image from the bot? I know that he has the image cause the avatar set the image. I just want them via api.
That's not that easy. There are multiple concerns I have for this.
- Currently the entire api is structured for json bodies which means I would have to add a second endpoint for data. (Which is planned for stuff like events too, but this is a bigger feature)
- To get the actual image I have three approaches which are all tradeoffs
- I would have to cache the image for each bot in memory, which would increase the memory consumption per playing bot of about 200-500kb; not that much but definitely something to keep in mind for bigger hosters.
- A different approach here would be to just forward the orginial url, but this is for eg not possible with mp3/4 files where the data is embedded.
- The last approach would be to forward the current teamspeak avatar; however the avatar might be changed or deleted manually, as well as another stream / data request is required to the server when requested. Or if the client does not have permissions to set the avatar this wouldn't work entirely
Right now the first one would seem the best for me, with an option to disable. However as said, the backend would need some more work for that.
For now it would be easy and nice for a link.
For the future I would make the first both options you discribed.