Update RT using http request
Opened this issue · 5 comments
recoilstv commented
Hi, Anthony! Can I update RT using data received via an http request?
Anthony96922 commented
Use wget to get the RT then write it to the FIFO control pipe.
recoilstv commented
Use wget to get the RT then write it to the FIFO control pipe.
The problem is that I do not know how to write an update script for FIFO :)
Anthony96922 commented
Do you want to get the data from a stream?
recoilstv commented
No, there is no data in my stream. I want to take track names from a file
Anthony96922 commented
If the RT is written to a file, your script could look like this:
oldRt = ""
newRt = ""
while(true) {
newRt = getFileContents(filename)
if (newRt != oldRt) { // update only if RT has changed
write(rds-control, "RT " newRt)
oldRt = newRt
}
sleep(5)
}
I like to know what you're using so I could help you write a script.