Example #1
0
        static void Main(string[] args)
        {
            arguments = ParseArgs(args);

            if (arguments == null)
            {
                return;
            }

            var sessionLoader = new SessionLoader();

            sessionLoader.FeedUri = arguments.FeedUrl;

            Console.WriteLine($"Feed: {arguments.FeedUrl}");

            WriteHighlight("Starting Feed Download");
            sessionLoader.LoadSessionList();
            WriteHighlight("Metadata Feed Complete");

            DisplaySessionMetaDataCounts(sessionLoader);

            if (arguments.MediaType != MediaType.None)
            {
                DownloadSessions(sessionLoader.Sessions, arguments.MediaType);
            }

            Console.WriteLine($"Finished at {DateTime.Now}");
            Console.ReadLine();
        }
Example #2
0
        private static void DisplaySessionMetaDataCounts(SessionLoader sessionLoader)
        {
            var slideDeckCount     = sessionLoader.Sessions.Where(y => String.IsNullOrEmpty(y.SlideDeckUrl) == false).Count();
            var captionsCount      = sessionLoader.Sessions.Where(y => String.IsNullOrEmpty(y.CaptionsUrl) == false).Count();
            var videoDownloadCount = sessionLoader.Sessions.Where(y => String.IsNullOrEmpty(y.MediaUrl) == false).Count();
            var thumbnailCount     = sessionLoader.Sessions.Where(y => String.IsNullOrEmpty(y.ThumbnailUrl) == false).Count();

            Console.WriteLine($"Sessions found: {sessionLoader.Sessions.Count}");
            Console.WriteLine($" Sessions with Video: {videoDownloadCount}");
            Console.WriteLine($" Sessions with Slides: {slideDeckCount}");
            Console.WriteLine($" Sessions with Captions: {captionsCount}");
            Console.WriteLine($" Sessions with Thumbnails: {thumbnailCount}");
        }