This commit is contained in:
Demetria Lovato 2021-06-23 20:41:34 -07:00
parent 8086045bc5
commit 6bb10ef57e
8 changed files with 50 additions and 29 deletions

Binary file not shown.

View File

@ -52,6 +52,10 @@ namespace youtube_downloader
}
static void Main(string[] args)
{
Thread t = new Thread(new ThreadStart(() => {
Server.Functions.Downloader.DL.DownloadThread().GetAwaiter().GetResult();
}));
t.Start();
// we need to get our app name so that
// we can create unique names for our mutex and our pipe
do
@ -148,6 +152,8 @@ namespace youtube_downloader
errs => 1);
}
static void WriteVideoInfo(StringBuilder b,SavedVideo v,bool description)
{
if (v != null)
{
//v.AuthorChannelId
//v.AuthorTitle
@ -180,6 +186,8 @@ namespace youtube_downloader
b.AppendLine(v.Description);
}
}
}
private static int RunInfo(Info opts)
{
//if ( != null)
@ -195,6 +203,8 @@ namespace youtube_downloader
else
{
var s=Server.Functions.Downloader.GetProgress();
if (s != null)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("=======Progress=======");
sb.AppendLine($"Progress: {s.Progress}%");
@ -203,7 +213,7 @@ namespace youtube_downloader
sb.AppendLine("=======Video Info=======");
WriteVideoInfo(sb, s.Saved, false);
Console.WriteLine(sb.ToString());
}
}
break;
case "queue":
@ -213,6 +223,8 @@ namespace youtube_downloader
Console.WriteLine(jsonData);
}
else
{
try
{
var s = Server.Functions.Downloader.GetQueueItems();
StringBuilder sb = new StringBuilder();
@ -224,7 +236,10 @@ namespace youtube_downloader
Console.WriteLine(sb.ToString());
} catch (Exception ex)
{
}
}
break;
case "location":

View File

@ -19,6 +19,11 @@ namespace youtube_downloader.Server.Functions
{
public class Downloader
{
public Downloader()
{
// TessesYoutubeDownloader.Server.Functions.Downloader.DL.DownloadThread().GetAwaiter().GetResult();
}
public static YoutubeClient CreateYoutubeClient()
{

View File

@ -0,0 +1 @@
{"Title":"Demi Lovato - Cool for the Summer (Official Video)","UploadDate":"7/23/2015 12:00:00 AM -07:00","Keywords":["demi lovato","cool for the summer","demi lovato cool for the summer","summer","demi lovato summer","demi lovato songs","demi","summer demi lovato","cool for the summer demi lovato","cool summer"],"Id":"il9nqWw9W3Y","AuthorTitle":"DemiLovatoVEVO","AuthorChannelId":"UCnyB9MYKRkSFK3IIB32CoVw","Description":"'Dancing With The Devil... The Art Of Starting Over': https://demilovato.lnk.to/DWTDTAOSO\nShop: shop.demilovato.com \nWatch the Demi Lovato: Dancing With The Devil documentary: http://yt.be/DemiDWTD\n\nConnect with Demi: \nSubscribe https://www.youtube.com/channel/UCZkURf9tDolFOeuw_4RD7XQ\nInstagram http://instagram.com/ddlovato\nTwitter http://twitter.com/ddlovato\nFacebook http://facebook.com/demilovato\nOfficial site http://demilovato.com\nJoin their mailing list to stay up to date http://www.demilovato.com/#mailing-list\n\nhttp://vevo.ly/b4JQfI","Duration":228.0,"Views":377251090,"Likes":2624522,"Dislikes":108978}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.