Jump to content

Got bad data (?) back from a ScheduledTasks/{id} call


BillOatman

Recommended Posts

BillOatman

I got this error once so far, and it doesn't seem to be reproducible on demand, but thought I would mention it anyway.
I have C# code that runs the RefreshGuide scheduled task, then waits for it to complete by making this call every 5 seconds until it sees a Idle status.

Quote

http://{host}:{port}/emby/ScheduledTasks/{id}?api_key={key}

Like I said, once so far I have gotten this error

Quote

Input string '11.519337016574585' is not a valid integer. Path 'CurrentProgressPercentage', line 1, position 88.

when I deserialize to this class

   public class Root
   {
       public string Name { get; set; }
       public string State { get; set; }
       public double CurrentProgressPercentage { get; set; }
       public string Id { get; set; }
       public LastExecutionResult LastExecutionResult { get; set; }
       public List<object> Triggers { get; set; }
       public string Description { get; set; }
       public string Category { get; set; }
       public bool IsHidden { get; set; }
       public string Key { get; set; }
   }

Is this not the right class to use, or is there some intermittent error in the API call?

Thanks!

EDIT:  Nevermind, RTFM :)  

image.png.e297bca45f9c22fc80086599b19041ba.png

Edited by BillOatman
Link to comment
Share on other sites

Hi, yes that class looks good (from a glance), except that CurrentProgressPercentage should be a double.

Link to comment
Share on other sites

BillOatman
Posted (edited)
43 minutes ago, Luke said:

 

Deleted

Edited by BillOatman
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...