示例#1
0
        static void Main(string[] args)
        {
            var options = new MyOptions();

            // Parse in 'strict mode', success or quit
            if (CommandLine.Parser.Default.ParseArguments(args, options))
            {
                validatePath(options.input);
                validatePath(options.output);

                runner run = new runner();
                run.InitBDROM(options.input);

                //If mpsl specified, select playlist in a different way
                if (options.playlistsToScan != null)
                {
                    try
                    {
                        System.Console.WriteLine("-m or --mpls specified, running in non-interactive mode...");
                        System.Console.Write("Atempting to find ");
                        System.Console.Write(String.Join <String>(", ", options.playlistsToScan) + Environment.NewLine);

                        run.SelectPlayList(options.playlistsToScan);
                    }
                    catch (Exception ex)
                    {
                        System.Console.WriteLine("ERROR: " + ex.Message);
                        Environment.Exit(-1);
                    }
                }
                else
                {
                    run.SelectPlayList();
                }

                if (options.playlistsToScan != null)
                {
                    run.AddStreamFilesInPlaylists();
                    run.ScanBDROM();
                    run.GenerateReport(options.output);
                }
                else
                {
                    run.ScanBDROM();
                }
            }
        }
示例#2
0
        static void Main(string[] args)
        {
            var options = new MyOptions();
            // Parse in 'strict mode', success or quit
            if(CommandLine.Parser.Default.ParseArguments(args, options))
            {
                validatePath(options.input);
                validatePath(options.output);

                runner run = new runner();
                run.InitBDROM(options.input);

                //If mpsl specified, select playlist in a different way
                if (options.playlistsToScan != null)
                {
                    try
                    {
                        System.Console.WriteLine("-m or --mpls specified, running in non-interactive mode...");
                        System.Console.Write("Atempting to find ");
                        System.Console.Write(String.Join<String>(", ", options.playlistsToScan) + Environment.NewLine);

                        run.SelectPlayList(options.playlistsToScan);
                    }
                    catch (Exception ex)
                    {
                        System.Console.WriteLine("ERROR: " + ex.Message);
                        Environment.Exit(-1);
                    }
                }
                else
                {
                    run.SelectPlayList();
                }

                run.AddStreamFilesInPlaylists();
                run.ScanBDROM();
                run.GenerateReport(options.output);
            }
        }