diff options
Diffstat (limited to 'win/CS/HandBrakeWPF/Helpers')
-rw-r--r-- | win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs b/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs index f0b942120..589c698e2 100644 --- a/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs +++ b/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs @@ -13,6 +13,8 @@ namespace HandBrakeWPF.Helpers using System.IO;
using System.Linq;
+ using Caliburn.Micro;
+
using HandBrake.ApplicationServices.Extensions;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Model.Encoding;
@@ -24,22 +26,6 @@ namespace HandBrakeWPF.Helpers public class AutoNameHelper
{
/// <summary>
- /// Backing field for the user setting service
- /// </summary>
- private static IUserSettingService userSettingService;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="AutoNameHelper"/> class.
- /// </summary>
- /// <param name="userSetting">
- /// The user Setting.
- /// </param>
- public AutoNameHelper(IUserSettingService userSetting)
- {
- userSettingService = userSetting;
- }
-
- /// <summary>
/// Function which generates the filename and path automatically based on
/// the Source Name, DVD title and DVD Chapters
/// </summary>
@@ -54,6 +40,13 @@ namespace HandBrakeWPF.Helpers /// </returns>
public static string AutoName(EncodeTask task, string sourceOrLabelName)
{
+
+ IUserSettingService userSettingService = IoC.Get<IUserSettingService>();
+ if (task.Destination == null)
+ {
+ task.Destination = string.Empty;
+ }
+
string autoNamePath = string.Empty;
if (task.Title != 0) // TODO check.
{
|