tsani / apollo

HTTP MPD integration for Labcoders Radio
MIT License
4 stars 0 forks source link

Async youtube-dl #15

Open tsani opened 7 years ago

tsani commented 7 years ago

Because youtube-dls are done synchronously (in apollo-dl) nginx sometimes kills the connection because it thinks upstream is dead.

tsani commented 7 years ago

This is actually tricky to do because the youtube-dl routine required working directory locking, which we currently have no way to do nicely via the Job monad. It could be interesting to pass an arbitrary constraint as a type parameter to Job so that when the job is run, we require that this constraint be satisfied. This constraint can be a monad class imbuing our job with the ability to acquire the directory lock.