diff options
author | sr55 <[email protected]> | 2016-04-09 15:24:50 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2016-04-09 15:24:50 +0100 |
commit | d3866786b03887914eb66f06dc1a529036e86244 (patch) | |
tree | 884d7e41c3af9debcafb0bda76d78f9222fd1eca /win/CS/HandBrakeWPF/Services/Scan | |
parent | 478431fc9ca190a8a43df354bd0a872903bb6c02 (diff) |
WinGui: Sanitise all Mixdown selections. Passthru the Codec into the Scanned Track object.
Diffstat (limited to 'win/CS/HandBrakeWPF/Services/Scan')
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Scan/LibScan.cs | 3 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Scan/Model/Audio.cs | 14 |
2 files changed, 8 insertions, 9 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Scan/LibScan.cs b/win/CS/HandBrakeWPF/Services/Scan/LibScan.cs index 23d38af4e..bd1f4cf12 100644 --- a/win/CS/HandBrakeWPF/Services/Scan/LibScan.cs +++ b/win/CS/HandBrakeWPF/Services/Scan/LibScan.cs @@ -384,8 +384,7 @@ namespace HandBrakeWPF.Services.Scan int currentAudioTrack = 1; foreach (SourceAudioTrack track in title.AudioList) { - - converted.AudioTracks.Add(new Audio(currentAudioTrack, track.Language, track.LanguageCode, track.Description, string.Empty, track.SampleRate, track.BitRate, track.ChannelLayout)); + converted.AudioTracks.Add(new Audio(currentAudioTrack, track.Language, track.LanguageCode, track.Description, track.Codec, track.SampleRate, track.BitRate, track.ChannelLayout)); currentAudioTrack++; } diff --git a/win/CS/HandBrakeWPF/Services/Scan/Model/Audio.cs b/win/CS/HandBrakeWPF/Services/Scan/Model/Audio.cs index ca2841bee..c0da86ecc 100644 --- a/win/CS/HandBrakeWPF/Services/Scan/Model/Audio.cs +++ b/win/CS/HandBrakeWPF/Services/Scan/Model/Audio.cs @@ -39,8 +39,8 @@ namespace HandBrakeWPF.Services.Scan.Model /// <param name="description"> /// The description. /// </param> - /// <param name="format"> - /// The format. + /// <param name="codec"> + /// The codec. /// </param> /// <param name="sampleRate"> /// The sample rate. @@ -51,14 +51,14 @@ namespace HandBrakeWPF.Services.Scan.Model /// <param name="channelLayout"> /// The channel Layout. /// </param> - public Audio(int trackNumber, string language, string languageCode, string description, string format, int sampleRate, int bitrate, int channelLayout) + public Audio(int trackNumber, string language, string languageCode, string description, int codec, int sampleRate, int bitrate, int channelLayout) { this.ChannelLayout = channelLayout; this.TrackNumber = trackNumber; this.Language = language; this.LanguageCode = languageCode; this.Description = description; - this.Format = format; + this.Codec = codec; this.SampleRate = sampleRate; this.Bitrate = bitrate; } @@ -86,7 +86,7 @@ namespace HandBrakeWPF.Services.Scan.Model /// <summary> /// Gets or sets The primary format of this Audio Track /// </summary> - public string Format { get; set; } + public int Codec { get; set; } /// <summary> /// Gets or sets The frequency (in MHz) of this Audio Track @@ -138,7 +138,7 @@ namespace HandBrakeWPF.Services.Scan.Model return true; } - return other.TrackNumber == this.TrackNumber && object.Equals(other.Language, this.Language) && object.Equals(other.LanguageCode, this.LanguageCode) && object.Equals(other.Format, this.Format); + return other.TrackNumber == this.TrackNumber && object.Equals(other.Language, this.Language) && object.Equals(other.LanguageCode, this.LanguageCode) && object.Equals(other.Codec, this.Codec); } /// <summary> @@ -182,7 +182,7 @@ namespace HandBrakeWPF.Services.Scan.Model int result = this.TrackNumber; result = (result * 397) ^ (this.Language != null ? this.Language.GetHashCode() : 0); result = (result * 397) ^ (this.LanguageCode != null ? this.LanguageCode.GetHashCode() : 0); - result = (result * 397) ^ (this.Format != null ? this.Format.GetHashCode() : 0); + result = (result * 397) ^ (this.Codec != null ? this.Codec.GetHashCode() : 0); return result; } } |