Grimdahl 0 Posted February 16, 2020 Share Posted February 16, 2020 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: Invoke-RestMethod -Method Get -Uri "http://localhost:8096/emby/LiveTv/Recordings?api_key=<token>" 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 More sharing options...
Luke 36999 Posted February 17, 2020 Share Posted February 17, 2020 Hi, try adding a userId param. Link to comment Share on other sites More sharing options...
PenkethBoy 2063 Posted February 17, 2020 Share Posted February 17, 2020 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 More sharing options...
Grimdahl 0 Posted February 17, 2020 Author Share Posted February 17, 2020 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 More sharing options...
Luke 36999 Posted February 17, 2020 Share Posted February 17, 2020 Thanks for the feedback. We'll take a look at that. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now