diff --git a/Application/FileConverter/ConversionJobs/ConversionJob_Gif.cs b/Application/FileConverter/ConversionJobs/ConversionJob_Gif.cs index 34c383c..5fd0123 100644 --- a/Application/FileConverter/ConversionJobs/ConversionJob_Gif.cs +++ b/Application/FileConverter/ConversionJobs/ConversionJob_Gif.cs @@ -47,7 +47,7 @@ namespace FileConverter.ConversionJobs this.intermediateFilePath = PathHelpers.GenerateUniquePath(tempPath + fileName + ".png"); // Convert input in png file to send it to ffmpeg for the gif conversion. - ConversionPreset intermediatePreset = new ConversionPreset("To compatible image", OutputType.Png, this.ConversionPreset.InputTypes.ToArray()); + ConversionPreset intermediatePreset = new ConversionPreset("To compatible image", null, OutputType.Png, this.ConversionPreset.InputTypes.ToArray()); this.pngConversionJob = ConversionJobFactory.Create(intermediatePreset, this.InputFilePath); this.pngConversionJob.PrepareConversion(this.intermediateFilePath); diff --git a/Application/FileConverter/ConversionJobs/ConversionJob_Ico.cs b/Application/FileConverter/ConversionJobs/ConversionJob_Ico.cs index 2659cd1..c0d252a 100644 --- a/Application/FileConverter/ConversionJobs/ConversionJob_Ico.cs +++ b/Application/FileConverter/ConversionJobs/ConversionJob_Ico.cs @@ -38,7 +38,7 @@ namespace FileConverter.ConversionJobs this.intermediateFilePath = PathHelpers.GenerateUniquePath(tempPath + fileName + ".png"); // Convert input in png file to send it to ffmpeg for the ico conversion. - ConversionPreset intermediatePreset = new ConversionPreset("To compatible image", OutputType.Png, this.ConversionPreset.InputTypes.ToArray()); + ConversionPreset intermediatePreset = new ConversionPreset("To compatible image", null, OutputType.Png, this.ConversionPreset.InputTypes.ToArray()); intermediatePreset.SetSettingsValue(ConversionPreset.ConversionSettingKeys.ImageClampSizePowerOf2, "True"); intermediatePreset.SetSettingsValue(ConversionPreset.ConversionSettingKeys.ImageMaximumSize, "256"); this.pngConversionJob = ConversionJobFactory.Create(intermediatePreset, this.InputFilePath); diff --git a/Application/FileConverter/ConversionPreset/ConversionPreset.cs b/Application/FileConverter/ConversionPreset/ConversionPreset.cs index 959c0e1..bf963ff 100644 --- a/Application/FileConverter/ConversionPreset/ConversionPreset.cs +++ b/Application/FileConverter/ConversionPreset/ConversionPreset.cs @@ -32,9 +32,10 @@ namespace FileConverter this.FullName = Properties.Resources.DefaultPresetName; } - public ConversionPreset(string fullName, OutputType outputType, params string[] inputTypes) + public ConversionPreset(string shortName, string[] parentFoldersNames, OutputType outputType, params string[] inputTypes) { - this.FullName = fullName; + this.ShortName = shortName; + this.ParentFoldersNames = parentFoldersNames; this.OutputType = outputType; List inputTypeList = new List(); inputTypeList.AddRange(inputTypes); @@ -43,9 +44,10 @@ namespace FileConverter this.outputFileNameTemplate = "(p)(f)"; } - public ConversionPreset(string fullName, ConversionPreset source, params string[] additionalInputTypes) + public ConversionPreset(string shortName, ConversionPreset source, params string[] additionalInputTypes) { - this.FullName = fullName; + this.ShortName = shortName; + this.ParentFoldersNames = source.ParentFoldersNames; this.OutputType = source.outputType; List inputTypeList = new List(); if (source.inputTypes != null) diff --git a/Application/FileConverter/ViewModels/SettingsViewModel.cs b/Application/FileConverter/ViewModels/SettingsViewModel.cs index 6721d1a..76683ad 100644 --- a/Application/FileConverter/ViewModels/SettingsViewModel.cs +++ b/Application/FileConverter/ViewModels/SettingsViewModel.cs @@ -65,8 +65,8 @@ namespace FileConverter.ViewModels { // Code runs in Blend --> create design time data. this.Settings = new Settings(); - this.Settings.ConversionPresets.Add(new ConversionPreset("Test", OutputType.Mp3)); - this.SelectedPreset = new ConversionPreset("Test", OutputType.Mp3); + this.Settings.ConversionPresets.Add(new ConversionPreset("Test", null, OutputType.Mp3)); + this.SelectedPreset = new ConversionPreset("Test", null, OutputType.Mp3); } else { @@ -602,7 +602,7 @@ namespace FileConverter.ViewModels } else { - newPreset = new ConversionPreset(presetName, OutputType.Mkv, new string[0]); + newPreset = new ConversionPreset(presetName, parent.FoldersNames, OutputType.Mkv, new string[0]); } parent.Children.Insert(insertIndex, newPreset);