Archived
1
0
This commit is contained in:
Michael Gordeev
2018-12-14 12:49:55 +03:00
parent b415dbd00a
commit 7597981420
2 changed files with 4 additions and 23 deletions
-18
View File
@@ -102,24 +102,6 @@ namespace FoxTube
Initialize();
}
async void GetVideosFromToday()
{
foreach (Subscription i in SecretsVault.Subscriptions)
{
SearchResource.ListRequest request = SecretsVault.NoAuthService.Search.List("snippet");
request.PublishedAfter = DateTime.Now.Subtract(TimeSpan.FromDays(1));
Debug.WriteLine(DateTime.Now.Subtract(TimeSpan.FromDays(1)));
request.ChannelId = i.Snippet.ResourceId.ChannelId;
request.Type = "video";
request.MaxResults = 5;
SearchListResponse response = await request.ExecuteAsync();
foreach (SearchResult result in response.Items)
ToastNotificationManager.CreateToastNotifier().Show(
FoxTube.Background.Notification.GetVideoToast(result.Id.VideoId, result.Snippet.ChannelId, result.Snippet.Title, result.Snippet.ChannelTitle, result.Snippet.Thumbnails.Medium.Url, i.Snippet.Thumbnails.Medium.Url));
}
}
public async void Initialize()
{
bool[] notificationsSettings = new bool[] { (bool)settings.Values["newVideoNotification"], (bool)settings.Values["devNews"] };