Open rsdr opened 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.
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.