R-a-dio / valkyrie

R/a/dio software stack
https://r-a-d.io
MIT License
5 stars 3 forks source link

Metadata updater #122

Open rsdr opened 4 months ago

rsdr commented 4 months ago

This'll probably need to be looked at, the code hasn't been tested on a server but does at least compile on Go's testing site. Edited the process for commands of ffmpeg since it's much simplier to use the temp file as a way to onboard the updating tags and then remove it, it's an empty file without any tags and a work-around for ffmpeg not allowing you to overwrite even when updating metadata. Sorry, this is probably awful, but it should at least detail the process and steps.

Wessie commented 4 months ago

Go doesn't actually spawn a shell but uses execve and thus each individual argument should be passed separately, like we're doing here https://github.com/R-a-dio/valkyrie/blob/master/streamer/audio/replaygain.go#L50 you can follow a similar code style for this function. For input you can take a radio.Song that has the required metadata fields.