2023-07-10, 11:42 PM
I have a single GPU on my server that is used for my gaming VM, but that VM isn't always running. What I'd like to do is make the GPU available to Jellyfin, then when the gaming VM needs to start:
1) If Jellyfin is streaming something, don't launch the VM
2) If Jellyfin is _not_ streaming something, relaunch the Jellyfin container w/o the nvidia runtime (aka, no GPU), then launch the VM
3) If the Gaming VM stops, restart Jellyfin with the nvidia runtime
What I'm missing is an API call to figure out if Jellyfin is actively streaming something, so I don't restart it and interrupt TV viewing. The
How can I check that it's "in use" vs just "running"?
1) If Jellyfin is streaming something, don't launch the VM
2) If Jellyfin is _not_ streaming something, relaunch the Jellyfin container w/o the nvidia runtime (aka, no GPU), then launch the VM
3) If the Gaming VM stops, restart Jellyfin with the nvidia runtime
What I'm missing is an API call to figure out if Jellyfin is actively streaming something, so I don't restart it and interrupt TV viewing. The
/health
endpoint just reports if it's alive or not, not actively serving any media.How can I check that it's "in use" vs just "running"?