Some analytic stuff

This commit is contained in:
tidusjar 2016-06-10 11:41:51 +01:00
parent 89db8eb728
commit 1c0e00e4ba
7 changed files with 50 additions and 9 deletions

View file

@ -177,7 +177,7 @@ namespace PlexRequests.Helpers.Analytics
request.ContentLength = Encoding.UTF8.GetByteCount(postDataString);
// write the request body to the request
using (var writer = new StreamWriter(request.GetRequestStream()))
using (var writer = new StreamWriter(await request.GetRequestStreamAsync()))
{
await writer.WriteAsync(postDataString);
}
@ -203,7 +203,7 @@ namespace PlexRequests.Helpers.Analytics
{ "v", "1" },
{ "tid", TrackingId },
{ "t", type.ToString() },
{"cid", "" }
{"cid", Guid.NewGuid().ToString() }
};
if (!string.IsNullOrEmpty(username))