First of all let me say that I am not asking "how to check a status of a previously uploaded video". My question is about getting the status of a video from the response of an upload. I am using the dotnet client and right after an upload is completed the response is a Google.Apis.Youtube.v3.Data.Video
object. That object has a property called Status
that contains the folllowing fields among others: RejectionReason
, PrivacyStatus
and UploadStatus
. The problem is that only the PrivacyStatus and UploadStatus have values. The RejectionReason is null. Jeff Posnick mentioned that (see whole thread here)
There's no way to determine whether a video is a duplicate or not as part of the upload response, because YouTube doesn't know whether the video is a duplicate until it has processed the video, and processing takes place after the upload has completed
That's a bit strange because when I issue a video.list right after the upload the API returns a status for the uploaded video. So even if the video is not published and it seems like YouTube is still indexing/processing the video it already knows the status of the "just uploaded video". So why can it not return the status as part of the response?
It's important that the response include the status because if not then, in the code, we have to do two API calls each time we do an upload: (1) insertmediaupload then (2) video.list. It'd a very costly operation especially that not all uploads will be duplicate.
EDIT As a response to Jeff-Posnick's comment below the question is "can the API wait for a few seconds and check if the processing is done and then include the status as part of the response?".
I came up with that question because of the behavior I've seen: That's a bit strange because when I issue a video.list right after the upload the API returns a status for the uploaded video
. But I've been playing around with the API and got inconsistent results. I have uploaded the same video over and over and sometimes there is "a duplicate" status and sometimes there is none. Please take note of the steps I took, #1 and #2 above. There are no other codes in between of those two API calls.