summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs
index a67bc293e..b4d8d65ab 100644
--- a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs
@@ -7,6 +7,8 @@
// </summary>
// --------------------------------------------------------------------------------------------------------------------
+using System.IO;
+
namespace HandBrakeWPF.ViewModels
{
using System.Collections.Generic;
@@ -156,11 +158,12 @@ namespace HandBrakeWPF.ViewModels
{
SubtitleTrack track = new SubtitleTrack
{
- SrtFileName = srtFile,
+ SrtFileName = Path.GetFileNameWithoutExtension(srtFile),
SrtOffset = 0,
SrtCharCode = "UTF-8",
SrtLang = "English",
- SubtitleType = SubtitleType.SRT
+ SubtitleType = SubtitleType.SRT,
+ SrtPath = srtFile
};
this.Task.SubtitleTracks.Add(track);
}