<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 5, 2017 at 2:18 PM, Bill Meek <span dir="ltr"><<a href="mailto:keemllib@gmail.com" target="_blank">keemllib@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 03/05/2017 03:39 PM, Marc Rawji wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
One last try... Does anyone know how to check (programatically)  if a<br>
client (like Kodi) is streaming content via the API?<br>
<br>
Thanks,<br>
Marc<br>
<br>
On Sun, Feb 26, 2017 at 9:41 PM, Marc Rawji <<a href="mailto:mrawji@gmail.com" target="_blank">mrawji@gmail.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On Sun, Feb 5, 2017 at 4:56 AM, Daniel Frey <<a href="mailto:dmfrey@gmail.com" target="_blank">dmfrey@gmail.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
you can do a HTTP GET to /Dvr/GetEncoderList. There is a Program object<br>
that indicates what the input is currently doing. You can determine from<br>
the as well if it is recording or watching live TV.<br>
<br>
On Sat, Feb 4, 2017, 11:59 PM Marc Rawji <<a href="mailto:mrawji@gmail.com" target="_blank">mrawji@gmail.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Everyone,<br>
<br>
I am running a combined mythbackend / mythfrontend in my living room...<br>
I have a couple of Kodi clients on other hosts (like tablets). If I<br>
understand correctly, Kodi uses the API to gain access to the recordings.<br>
<br>
Is there a way that I can query the API to find out if there are any<br>
clients currently watching content via the API?<br>
<br>
Thanks,<br>
Marc<br>
<br>
<br>
</blockquote>
<br>
</blockquote>
Thanks Daniel... I just tried that and the response from that API is the<br>
same whether or not a client is playing something... am I using it wrong?<br>
<br>
I am calling it like this:<br>
curl <a href="http://localhost:6544/Dvr/GetEncoderList" rel="noreferrer" target="_blank">http://localhost:6544/Dvr/GetE<wbr>ncoderList</a> | xmllint --format -<br>
<br>
</blockquote></blockquote>
<br></span>
If by clients you mean the frontend, then the following, but if you're<br>
referring to something else that's doing Content/GetFile?FileName=xxx,<br>
then I don't know of an answer.<br>
<br>
Dvr/Frontend/GetStatus (on port 6547)<br>
<br>
An idle frontend returns:<br>
<br>
{<br>
    "FrontendStatus": {<br>
        "AudioTracks": {},<br>
        "ChapterTimes": [],<br>
        "Name": "ofc0",<br>
        "State": {<br>
            "currentlocation": "playbackbox",<br>
            "menutheme": "defaultmenu",<br>
            "state": "idle"<br>
        },<br>
        "SubtitleTracks": {},<br>
        "Version": "v29-pre-307-g0a46103-dirty"<br>
    }<br>
}<br>
<br>
If actively viewing, there are some 50ish lines of output<br>
and, of course, the state: changes to WatchingLiveTV.<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Bill</font></span><div class="HOEnZb"><div class="h5"><br>
</div></div></blockquote></div><br></div><div class="gmail_extra">Thanks Bill. Yeah, it's not a Frontend, so no Frontend API to query. I have multiple tablets with Kodi on them that I am using to view my recordings. I have a script that turns off my backend if it's idle. I am looking for a way to detect when my backend is sending content to one of my tablets to keep it from shutting down.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks,</div><div class="gmail_extra">Marc</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div></div>