From 76d5d785eaac5d20d2be5fd92c7ac0f2094ed727 Mon Sep 17 00:00:00 2001 From: Scott Lovegrove Date: Wed, 23 Dec 2015 16:58:31 +0000 Subject: [PATCH] Actually set the labels from categories --- .../Clients/GoogleBloggerv3Client.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/managed/OpenLiveWriter.BlogClient/Clients/GoogleBloggerv3Client.cs b/src/managed/OpenLiveWriter.BlogClient/Clients/GoogleBloggerv3Client.cs index 07dd2c4a..fafe7cef 100644 --- a/src/managed/OpenLiveWriter.BlogClient/Clients/GoogleBloggerv3Client.cs +++ b/src/managed/OpenLiveWriter.BlogClient/Clients/GoogleBloggerv3Client.cs @@ -107,10 +107,12 @@ namespace OpenLiveWriter.BlogClient.Clients private static Post ConvertToGoogleBloggerPost(BlogPost post) { + var labels = post.Categories?.Select(x => x.Name).ToList(); + labels?.AddRange(post.NewCategories?.Select(x => x.Name) ?? new List()); return new Post() { Content = post.Contents, - Labels = post.Keywords?.Split(new char[] { LabelDelimiter }, StringSplitOptions.RemoveEmptyEntries).Select(k => k.Trim()).ToList(), + Labels = labels ?? new List(), // TODO:OLW - DatePublishedOverride didn't work quite right. Either the date published override was off by several hours, // needs to be normalized to UTC or the Blogger website thinks I'm in the wrong time zone. Published = post.HasDatePublishedOverride ? post?.DatePublishedOverride : null,