Archived
1
0

Now can download videos

This commit is contained in:
Michael Gordeev
2018-10-21 21:59:35 +03:00
parent 3bca3a30be
commit fb3b88a046
11 changed files with 142 additions and 116 deletions
+14
View File
@@ -1,6 +1,8 @@
using Google.Apis.YouTube.v3;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text.RegularExpressions;
using System.Web;
using Windows.ApplicationModel.Core;
@@ -31,6 +33,18 @@ namespace FoxTube
return new Uri(url);
}
public static string ReplaceInvalidChars(this string str, char newValue)
{
foreach (char i in Path.GetInvalidFileNameChars())
str = str.Replace(i, newValue);
return str;
}
public static string Last(this string[] arr)
{
return arr[arr.Length - 1];
}
public static string GetAgo(DateTime dateTime)
{
TimeSpan span = DateTime.Now - dateTime;