diff --git a/.changelog/1066.txt b/.changelog/1066.txt new file mode 100644 index 00000000000..9e0282172de --- /dev/null +++ b/.changelog/1066.txt @@ -0,0 +1,3 @@ +```release-note:bug +stream: Update pctComplete to string from int +``` diff --git a/stream.go b/stream.go index 9529c4025e4..e12630495ae 100644 --- a/stream.go +++ b/stream.go @@ -65,7 +65,7 @@ type StreamVideoPlayback struct { // StreamVideoStatus represents the status of a stream video. type StreamVideoStatus struct { State string `json:"state,omitempty"` - PctComplete int `json:"pctComplete,omitempty"` + PctComplete string `json:"pctComplete,omitempty"` ErrorReasonCode string `json:"errorReasonCode,omitempty"` ErrorReasonText string `json:"errorReasonText,omitempty"` } diff --git a/stream_test.go b/stream_test.go index 094d794d05b..eb821cec61a 100644 --- a/stream_test.go +++ b/stream_test.go @@ -41,7 +41,7 @@ const ( "size": 4190963, "status": { "state": "inprogress", - "pctComplete": 51, + "pctComplete": "51", "errorReasonCode": "ERR_NON_VIDEO", "errorReasonText": "The file was not recognized as a valid video file." }, @@ -98,7 +98,7 @@ func createTestVideo() StreamVideo { Size: 4190963, Status: StreamVideoStatus{ State: "inprogress", - PctComplete: 51, + PctComplete: "51", ErrorReasonCode: "ERR_NON_VIDEO", ErrorReasonText: "The file was not recognized as a valid video file.", }, @@ -304,7 +304,7 @@ func TestStream_ListVideos(t *testing.T) { "size": 4190963, "status": { "state": "inprogress", - "pctComplete": 51, + "pctComplete": "51", "errorReasonCode": "ERR_NON_VIDEO", "errorReasonText": "The file was not recognized as a valid video file." },