Jump to content

API Get LiveTV Recordings always returns 0


Grimdahl

Recommended Posts

Grimdahl

I am using the API to see if there are any live TV shows being recorded as part of a PowerShell script, but it is always returning zero.  I get the same response whether there is nothing being recorded or if multiple shows are actively recording.

 

The PowerShell line is essentially this:

 
And the response is always this:
{
"Items": [],
"TotalRecordCount": 0
}
 
I am running this locally on the server and remote access is disabled.  If I perform an execute of this command via Swagger, I get the same response.  I have tried multiple arguments as well, but no change.
 
If I run other similar API commands in the LiveTV subset, such as Channels or TunerHosts, I am getting responses with appropriate information so it smells like an issue with the Recordings command.  Is there an argument that is required but isn't flagged as such?  Is anyone using this and getting accurate responses?
 
Link to comment
Share on other sites

PenkethBoy

i do the same and use this

$MediaUrl = $EmbyServerUrl + "/emby/LiveTv/Recordings?UserId=" + $user.User.Id + "&IsInProgress=true" + "&api_key=" + $user.AccessToken    
$Media = Invoke-WebRequest -Uri $MediaUrl -Method Get
$Media = $Media.Content | ConvertFrom-Json
        if ($Media.Items.Count -eq 0) .... then no Active Recordings
Link to comment
Share on other sites

Grimdahl

That did it - thank you both.

 

@@Luke - I recommend flagging UserId as a required parameter in the documentation if possible.

 

@@PenkethBoy - I appreciate the additional content you provided there as well!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...