From ffb762dd2e74f1c4f0dd573ff054205bc4bc2655 Mon Sep 17 00:00:00 2001 From: sr55 Date: Fri, 19 Sep 2008 16:50:52 +0000 Subject: WinGui: - Just allow ISO_Open to open all files. Will save adding all the ffmpeg options available. - Re-factored the chapter marker creation/query generation code. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1731 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/Functions/Common.cs | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) (limited to 'win/C#/Functions') diff --git a/win/C#/Functions/Common.cs b/win/C#/Functions/Common.cs index 41f6e71f6..b55c8e566 100644 --- a/win/C#/Functions/Common.cs +++ b/win/C#/Functions/Common.cs @@ -860,7 +860,7 @@ namespace Handbrake.Functions // This is for the queue. It allows different chapter name files for each title. string source_name = mainWindow.text_source.Text; string[] sourceName = source.Split('\\'); - source_name = sourceName[sourceName.Length - 1].Replace(".iso", "").Replace(".mpg", "").Replace(".ts", "").Replace(".ps", ""); + source_name = sourceName[sourceName.Length - 1]; source_name = source_name.Replace("\"", ""); string source_title = mainWindow.drp_dvdtitle.Text; @@ -869,36 +869,21 @@ namespace Handbrake.Functions if (mainWindow.Check_ChapterMarkers.Checked) { - if ((source_name.Trim().Replace("-i ", "") != "Click 'Browse' to continue") && (source_name.Trim().Replace("-i ", "") != "")) + if ((source_name.Trim() != "Click 'Source' to continue") && (source_name.Trim() != "")) { + string path = ""; if (source_title != "Automatic") - { - string filename = source_name + "-" + source_title + "-chapters.csv"; - string path = Path.Combine(Path.GetTempPath(), filename); - - Boolean saveCSV = chapterCSVSave(mainWindow, path); - if (saveCSV == false) - query += " -m "; - else - query += " --markers=" + "\"" + path + "\""; - } + path = Path.Combine(Path.GetTempPath(), source_name + "-" + source_title + "-chapters.csv"); else - { - string filename = source_name + "-chapters.csv"; - string path = Path.Combine(Path.GetTempPath(), filename); + path = Path.Combine(Path.GetTempPath(), source_name + "-chapters.csv"); - Boolean saveCSV = chapterCSVSave(mainWindow, path); - if (saveCSV == false) - query += " -m "; - else - query += " --markers=" + "\"" + path + "\""; - } + if (chapterCSVSave(mainWindow, path) == false) + query += " -m "; + else + query += " --markers=" + "\"" + path + "\""; } else - { - string path = Path.Combine(Path.GetTempPath(), "chapters.csv"); - query += " --markers=" + "\"" + path + "\""; - } + query += " -m"; } #endregion -- cgit v1.2.3