Well, I'm depressing so no message. Just accept your faith
This commit is contained in:
@@ -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")}'/>
|
||||
|
||||
Reference in New Issue
Block a user