f3lixding / dookie

A highly opinionated home automation server that I am writing for my own shitty little set up, hence the name.
0 stars 0 forks source link

[Feature] Pause all items on qbit when remote sessions are detected #15

Open f3lixding opened 1 month ago

f3lixding commented 1 month ago

To maximize experience for remote sessions, we would need to stop torrent client during ongoing remote sessions. Downloads are initiated via indexer managers. One way we can control that is to have our program act as a proxy for qbit client. Prior to proxying normal requests, we can consult plex to understand whether there is a remote session ongoing. If there is, we cache the response (maybe in a persistent layer like a db?), and only proxy the request to qbit when said remote sessions had ended.

f3lixding commented 1 month ago

Instead of polling Plex's api, we can instead take advantage of webhook. We can keep track of the number of ongoing remote sessions that way.