I can't figure out a good approach for this, but this seems like a not-awful one... sending as a pull request rather than committing straight to master, because I'm not sure and would value a second opinion.
If we have processmedia notify the API server whenever it has finished processing, how does that work when encoding happens on a different machine, offline, and the results are sync'ed via syncthing a few hours later? What if we have many people sharing the same dataset but running their own servers? My gut tells me that processmedia should only care about the source folder and the processed folder, and have no other inputs or outputs
My other idea was using inotify to monitor tracks.json for changes, but that appears to have issues when the server runs inside docker, and the file is modified outside of it.
I can't figure out a good approach for this, but this seems like a not-awful one... sending as a pull request rather than committing straight to master, because I'm not sure and would value a second opinion.
If we have processmedia notify the API server whenever it has finished processing, how does that work when encoding happens on a different machine, offline, and the results are sync'ed via syncthing a few hours later? What if we have many people sharing the same dataset but running their own servers? My gut tells me that processmedia should only care about the
source
folder and theprocessed
folder, and have no other inputs or outputsMy other idea was using inotify to monitor tracks.json for changes, but that appears to have issues when the server runs inside docker, and the file is modified outside of it.