예제 #1
0
        /// <summary>
        ///     Debug Test Button
        /// </summary>
        private void btnDebugTest_Click(object sender, RoutedEventArgs e)
        {
            MainWindow mainwindow = (MainWindow)System.Windows.Application.Current.MainWindow;
            ViewModel  vm         = mainwindow.DataContext as ViewModel;

            // -------------------------
            // Clear Variables before Run
            // -------------------------
            MainWindow.ClearGlobalVariables(vm);

            // -------------------------
            // Batch Extention Period Check
            // -------------------------
            MainWindow.BatchExtCheck(vm);

            // -------------------------
            // Set FFprobe Path
            // -------------------------
            MainWindow.FFprobePath(vm);

            // -------------------------
            // Set youtube-dl Path
            // -------------------------
            MainWindow.youtubedlPath(vm);

            // -------------------------
            // Ready Halts
            // -------------------------
            if (MainWindow.ReadyHalts(vm) == true)
            {
                // -------------------------
                // Single
                // -------------------------
                if (vm.Batch_IsChecked == false)
                {
                    // -------------------------
                    // FFprobe Detect Metadata
                    // -------------------------
                    FFprobe.Metadata(vm);

                    // -------------------------
                    // FFmpeg Generate Arguments (Single)
                    // -------------------------
                    //disabled if batch
                    FFmpeg.FFmpegSingleGenerateArgs(vm);
                }

                // -------------------------
                // Batch
                // -------------------------
                else if (vm.Batch_IsChecked == true)
                {
                    // -------------------------
                    // FFprobe Video Entry Type Containers
                    // -------------------------
                    FFprobe.VideoEntryType(vm);

                    // -------------------------
                    // FFprobe Video Entry Type Containers
                    // -------------------------
                    FFprobe.AudioEntryType(vm);

                    // -------------------------
                    // FFmpeg Generate Arguments (Batch)
                    // -------------------------
                    //disabled if single file
                    FFmpeg.FFmpegBatchGenerateArgs(vm);
                }

                // -------------------------
                // Write Variables to Debug Window
                // -------------------------
                DebugWrite(this, vm);

                // -------------------------
                // Clear Variables for next Run
                // -------------------------
                MainWindow.ClearGlobalVariables(vm);
                GC.Collect();
            }
        }