diff options
author | sr55 <[email protected]> | 2012-06-19 18:42:08 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-06-19 18:42:08 +0000 |
commit | e4460af63dd76181f489da5f6281a3716c2bf58f (patch) | |
tree | 0627446f346cb92bfff2e2948bdd2d6cdc81ef88 /win/CS/HandBrake.ApplicationServices | |
parent | 5371a5167357f3d1f2120fc8fefad4c4fd1527a8 (diff) |
WinGui:WinGui:
- Fix Foreign Audio Search Feature
- Fix FFMpeg4/2 encoder selection
- Allow the Preset window to overwrite existing presets.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4756 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices')
4 files changed, 16 insertions, 5 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleType.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleType.cs index 64e8f8ff8..a249060b5 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleType.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleType.cs @@ -31,6 +31,8 @@ namespace HandBrake.ApplicationServices.Model.Encoding [Description("PGS")]
PGS,
[Description("Unknown")]
- Unknown
+ Unknown,
+ [Description("Foreign Audio Search")]
+ ForeignAudioSearch, // Special Type for Foreign Audio Search
}
}
\ No newline at end of file diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs index a7c7158a6..6548f3aaf 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs @@ -173,7 +173,7 @@ namespace HandBrake.ApplicationServices.Parsing /// <returns>A string formatted as: {track #} {language}</returns>
public override string ToString()
{
- return string.Format("{0} {1} ({2})", TrackNumber, Language, TypeString);
+ return this.SubtitleType == SubtitleType.ForeignAudioSearch ? "Foreign Audio Scan" : string.Format("{0} {1} ({2})", this.TrackNumber, this.Language, this.TypeString);
}
}
}
\ No newline at end of file diff --git a/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs b/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs index 804a963b6..bab41a9b8 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs @@ -116,7 +116,8 @@ namespace HandBrake.ApplicationServices.Services #region Public Methods
/// <summary>
- /// Add a new preset to the system
+ /// Add a new preset to the system.
+ /// Performs an Update if it already exists
/// </summary>
/// <param name="preset">
/// A Preset to add
@@ -135,6 +136,11 @@ namespace HandBrake.ApplicationServices.Services // Update the presets file
this.UpdatePresetFiles();
return true;
+ }
+ else
+ {
+ this.Update(preset);
+ return true;
}
return false;
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs index ec6f74562..1fbd1244c 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs @@ -407,7 +407,10 @@ namespace HandBrake.ApplicationServices.Utilities switch (task.VideoEncoder)
{
case VideoEncoder.FFMpeg:
- query += " -e ffmpeg";
+ query += " -e ffmpeg4";
+ break;
+ case VideoEncoder.FFMpeg2:
+ query += " -e ffmpeg2";
break;
case VideoEncoder.X264:
query += " -e x264";
@@ -743,7 +746,7 @@ namespace HandBrake.ApplicationServices.Utilities subCount++;
// Find --subtitle <string>
- if (item.Track.Contains("Foreign Audio Search"))
+ if (item.SourceTrack.SubtitleType == SubtitleType.ForeignAudioSearch)
itemToAdd = "scan";
else
{
|