Archived
1
0

Well, I'm depressing so no message. Just accept your faith

This commit is contained in:
Michael Gordeev
2019-03-26 12:16:56 +03:00
parent 34e33d3f0e
commit 854b0c88b1
81 changed files with 1212 additions and 178 deletions
+7 -4
View File
@@ -1,4 +1,7 @@
using Newtonsoft.Json;
using Google.Apis.YouTube.v3.Data;
using Microsoft.Toolkit.Uwp.Notifications;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using Windows.Data.Xml.Dom;
using Windows.Storage;
@@ -51,11 +54,11 @@ namespace FoxTube.Background
return new ToastNotification(template);
}
public static ToastNotification GetVideoToast(string id, string channelId, string title, string channel, string thumbnail, string avatar)
public static ToastNotification GetVideoToast(string id, string channelId, string title, string channel, string thumbnail, DateTimeOffset timeStamp, string avatar)
{
XmlDocument template = new XmlDocument();
template.LoadXml($@"<toast activationType='foreground' launch='video|{id}'>
string ts = $"{timeStamp.Year}-{timeStamp.Month:00}-{timeStamp.Day:00}T{timeStamp.Hour:00}:{timeStamp.Minute:00}:{timeStamp.Second:00}Z";
template.LoadXml($@"<toast activationType='foreground' launch='video|{id}' displayTimestamp='{ts}'>
<visual>
<binding template='ToastGeneric'>
<image placement='hero' src='{thumbnail.Replace("&", "%26")}'/>