#124: Test commit
This commit is contained in:
@@ -30,7 +30,7 @@ namespace FoxTube.Background
|
|||||||
|
|
||||||
if (settings.Values["lastCheck"] == null)
|
if (settings.Values["lastCheck"] == null)
|
||||||
{
|
{
|
||||||
settings.Values.Add("lastCheck", DateTime.UtcNow.ToString());
|
settings.Values.Add("lastCheck", DateTime.Now.ToString());
|
||||||
def.Complete();
|
def.Complete();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -48,7 +48,7 @@ namespace FoxTube.Background
|
|||||||
catch { }
|
catch { }
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
settings.Values["lastCheck"] = DateTime.UtcNow.ToString();
|
settings.Values["lastCheck"] = DateTime.Now.ToString();
|
||||||
def.Complete();
|
def.Complete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -61,7 +61,7 @@ namespace FoxTube.Background
|
|||||||
foreach (var s in subscriptions)
|
foreach (var s in subscriptions)
|
||||||
{
|
{
|
||||||
SearchResource.ListRequest request = Service.Search.List("snippet");
|
SearchResource.ListRequest request = Service.Search.List("snippet");
|
||||||
request.PublishedAfter = lastCheck;
|
request.PublishedAfter = lastCheck.Subtract(TimeSpan.FromDays(1));
|
||||||
request.ChannelId = s.Key;
|
request.ChannelId = s.Key;
|
||||||
request.Type = "video";
|
request.Type = "video";
|
||||||
request.MaxResults = 5;
|
request.MaxResults = 5;
|
||||||
|
|||||||
@@ -336,7 +336,7 @@ namespace FoxTube
|
|||||||
public static void CheckAddons()
|
public static void CheckAddons()
|
||||||
{
|
{
|
||||||
//TO-DO: Check addons list
|
//TO-DO: Check addons list
|
||||||
bool purchased = false;
|
bool purchased = true;
|
||||||
|
|
||||||
if(!purchased)
|
if(!purchased)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ using Windows.Networking.Connectivity;
|
|||||||
using Windows.UI.Core;
|
using Windows.UI.Core;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using Google.Apis.YouTube.v3;
|
||||||
|
|
||||||
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
|
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
|
||||||
|
|
||||||
@@ -103,7 +104,20 @@ namespace FoxTube
|
|||||||
|
|
||||||
async void GetVideosFromToday()
|
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()
|
public async void Initialize()
|
||||||
|
|||||||
Reference in New Issue
Block a user