Beispiel #1
0
        public async Task LoadDroppedPaths(string[] droppedPaths)
        {
            foreach (string path in droppedPaths)
            {
                Logger.Log($"Dropped file: '{path}'", true);
                string frame1 = Path.Combine(path, "00000001.png");
                if (IOUtils.IsPathDirectory(path) && !File.Exists(frame1))
                {
                    InterpolateUtils.ShowMessage($"Can't find frames in this folder:\n\n{frame1} does not exist.", "Error");
                    continue;
                }

                InterpSettings current = Program.mainForm.GetCurrentSettings();
                current.UpdatePaths(path, path.GetParentDir());
                current.inFps = await GetFramerate(path);

                current.outFps = current.inFps * current.interpFactor;
                Program.batchQueue.Enqueue(current);
                RefreshGui();
                await Task.Delay(100);
            }
        }
Beispiel #2
0
        public async Task LoadDroppedPaths(string[] droppedPaths, bool start = false)
        {
            foreach (string path in droppedPaths)
            {
                Logger.Log($"BatchForm: Dropped path: '{path}'", true);

                InterpSettings current = Program.mainForm.GetCurrentSettings();
                string         outDir  = (Config.GetInt("outFolderLoc") == 0) ? path.GetParentDir() : Config.Get("custOutDir").Trim();
                current.UpdatePaths(path, outDir);

                current.inFpsDetected = await IoUtils.GetFpsFolderOrVideo(path);

                current.inFps  = current.inFpsDetected;
                current.outFps = current.inFps * current.interpFactor;

                Program.batchQueue.Enqueue(current);
                RefreshGui();
            }

            if (start)
            {
                runBtn_Click(null, null);
            }
        }