Jellyfin Forum
How to check if Jellyfin is in-use? - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: General Questions (https://forum.jellyfin.org/f-general-questions)
+--- Thread: How to check if Jellyfin is in-use? (/t-how-to-check-if-jellyfin-is-in-use)



How to check if Jellyfin is in-use? - ScottE - 2023-07-10

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 /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"?