コード例 #1
0
        public static bool RunSanityChecks()
        {
            if (!CheckExists())
            {
                Console.WriteLine("dvrchive: ERROR: config.json not found at: {0}", path);
                return(false);
            }

            if (!DVR.CheckExists())
            {
                Console.WriteLine("dvrchive: ERROR: DVR location does not exist: {0}", DVR.path);
                return(false);
            }

            if (!Directory.Exists(archivePath))
            {
                Console.WriteLine("dvrchive: ERROR: archive location does not exist: {0}", archivePath);
                return(false);
            }

            if (!CheckWineComskipExists())
            {
                Console.WriteLine("dvrchive: ERROR: using non-Windows OS and comskip.exe not specified correctly in config.json");
                return(false);
            }

            return(true);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: shadowridgedev/dvrchive
        static void Main(string[] args)
        {
            if (args.Length == 1)
            {
                DVR.path = args[0];

                AppConfig.Load();

                if (
                    !AppConfig.RunSanityChecks()
                    )
                {
                    ShowUsage();
                }
                else
                {
                    DVR.Archive();
                }
            }
            else
            {
                ShowUsage();
            }
        }