Exemple #1
0
        static void Main(string[] args)
        {
            var db = new VideoInfo(localhost, dbName);

            foreach (var parentPath in Directory.GetDirectories(rootPath))
            {
                foreach (var path in Directory.GetDirectories(parentPath))
                {
                    try
                    {
                        Console.WriteLine("Parsing " + path);
                        var rawDoc = db.ReadRawInfoFromPathAsync(path).GetAwaiter().GetResult();
                        Console.WriteLine("Uploading");
                        db.UploadAsync(rawDoc, false);
                        Console.WriteLine(".");
                    }
                    catch (Exception ex)
                    {
                        PlaybackEvents.WriteLines(errorFile, new string[] { path, ex.Message, "" });
                    }
                }
            }
        }
Exemple #2
0
        static void ExtractFirst10lines()
        {
            var lines = PlaybackEvents.ReadLines(playbackEventFile, 10);

            PlaybackEvents.WriteLines(playbackEventPartialFile, lines);
        }