I am attempting to pull a Named media entry via API,then check when the mediaentry was recorded or created or uploaded, then check the status.
I am able to pull a mediaEntry by name, then pasrse the string for information.My problem is with the StartDate and EndDate of the MediaEntry
Using the generated code from media.get - Kaltura VPaaS API Documentation, I am unable to get a meaningful startdate or endate from the API. The startdate and endate are returned as -2147483648, which is the smallest possible signed 32bit integer. I would appreciate help, as I am trying to write a program to check the status of recordings by time period.
static void Main(string[] args)
{
Client client = createKalturaClient();
bool done = false;
string entryId = "0_4jc0n48q";
OnCompletedHandler<MediaEntry> handler = new OnCompletedHandler<MediaEntry>(
(MediaEntry result, Exception e) =>
{
PrintObject(result);
done = true;
//The line belwo is the only added line. It pulls the StartDate directly from the MediaItem
Console.WriteLine(result.StartDate);
});
MediaService.Get(entryId)
.SetCompletion(handler)
.Execute(client);
while (!done)
{
Thread.Sleep(100);
}
}
static Client createKalturaClient()
{
Configuration config = new Configuration();
config.ServiceUrl = "https://www.kaltura.com/";
Client client = new Client(config);
int partnerId = ;
string secret = "";
string userId = "";
SessionType type = SessionType.ADMIN;
int expiry = 86400;
string privileges = "";
client.KS = client.GenerateSession(partnerId, secret, userId, type, expiry, privileges);
return client;
}
public static void PrintObject<T>(T obj)
{
var t = typeof(T);
var props = t.GetProperties();
StringBuilder sb = new StringBuilder();
foreach (var item in props)
{
try
{
sb.Append(item.Name + ": " + item.GetValue(obj, null) + "\n");
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
}
sb.AppendLine();
Console.WriteLine(sb.ToString());
}
}
This bug with the wrong data type appears to apply to the following fields:
SearchProviderType, IsTrimDisabled, StartDate, EndDate
All of those fields return -2147483648 which is the minimum value of a signed 32 bit integer. This corresponds to GMT: Friday, December 13, 1901 8:45:52 PM
When I do the same query on media.get - Kaltura VPaaS API Documentation
there is not a field for StartDate or EndDate. There are fields for CreatedAt and Updated at.
Should I be able to get a meaningful StartDate or EndDate?
What does the createdAt field of a MediaEntry mean? What does the UpdatedAt field of a mediaEntry mean?
Thank you