Added Subscriptions page and updated subscriptions management
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
using FoxTube.Utils;
|
||||
using Google.Apis.YouTube.v3.Data;
|
||||
using SQLitePCL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
using Windows.Devices.PointOfService;
|
||||
using Windows.UI;
|
||||
@@ -47,7 +49,7 @@ namespace FoxTube
|
||||
public static string ToHex(this Color color) =>
|
||||
$"#{color.R:X}{color.G:X}{color.B:X}";
|
||||
|
||||
public static Color FromHex(this Color parent, string hex)
|
||||
public static Color FromHex(string hex)
|
||||
{
|
||||
hex = hex.Replace("#", "");
|
||||
List<byte> values = new List<byte>();
|
||||
@@ -126,5 +128,14 @@ namespace FoxTube
|
||||
else
|
||||
return Math.Round(span.TotalDays / 365) + " " + "years ago";
|
||||
}
|
||||
|
||||
public static async Task<Channel> GetChannel(string channelId, string part)
|
||||
{
|
||||
var request = UserManagement.Service.Channels.List(part);
|
||||
request.Id = channelId;
|
||||
request.MaxResults = 1;
|
||||
|
||||
return (await request.ExecuteAsync()).Items.FirstOrDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user