summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Services/Scan
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/Scan')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/Scan/LibScan.cs73
1 files changed, 36 insertions, 37 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Scan/LibScan.cs b/win/CS/HandBrake.ApplicationServices/Services/Scan/LibScan.cs
index 5eab75520..b67513826 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/Scan/LibScan.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/Scan/LibScan.cs
@@ -102,13 +102,13 @@ namespace HandBrake.ApplicationServices.Services.Scan
#region Events
- /// <summary>
- /// Scan has Started
- /// </summary>
- public event EventHandler ScanStarted;
-
- /// <summary>
- /// Scan has completed
+ /// <summary>
+ /// Scan has Started
+ /// </summary>
+ public event EventHandler ScanStarted;
+
+ /// <summary>
+ /// Scan has completed
/// </summary>
public event ScanCompletedStatus ScanCompleted;
@@ -318,14 +318,14 @@ namespace HandBrake.ApplicationServices.Services.Scan
HandBrakeUtils.SetDvdNav(!configuraiton.IsDvdNavDisabled);
- this.ServiceLogMessage("Starting Scan ...");
- this.instance.StartScan(sourcePath.ToString(), previewCount, minDuration, title != 0 ? title : 0);
-
- if (this.ScanStarted != null)
- this.ScanStarted(this, System.EventArgs.Empty);
- }
- catch (Exception exc)
- {
+ this.ServiceLogMessage("Starting Scan ...");
+ this.instance.StartScan(sourcePath.ToString(), previewCount, minDuration, title != 0 ? title : 0);
+
+ if (this.ScanStarted != null)
+ this.ScanStarted(this, System.EventArgs.Empty);
+ }
+ catch (Exception exc)
+ {
this.ServiceLogMessage("Scan Failed ..." + Environment.NewLine + exc);
this.Stop();
@@ -488,28 +488,28 @@ namespace HandBrake.ApplicationServices.Services.Scan
Playlist = title.Type == 1 ? string.Format(" {0:d5}.MPLS", title.Playlist).Trim() : null,
FramerateNumerator = title.FrameRate.Num,
FramerateDenominator = title.FrameRate.Den
- };
-
- int currentTrack = 1;
- foreach (SourceChapter chapter in title.ChapterList)
- {
- string chapterName = !string.IsNullOrEmpty(chapter.Name) ? chapter.Name : string.Empty;
- converted.Chapters.Add(new Chapter(currentTrack, chapterName, new TimeSpan(chapter.Duration.Hours, chapter.Duration.Minutes, chapter.Duration.Seconds)));
+ };
+
+ int currentTrack = 1;
+ foreach (SourceChapter chapter in title.ChapterList)
+ {
+ string chapterName = !string.IsNullOrEmpty(chapter.Name) ? chapter.Name : string.Empty;
+ converted.Chapters.Add(new Chapter(currentTrack, chapterName, new TimeSpan(chapter.Duration.Hours, chapter.Duration.Minutes, chapter.Duration.Seconds)));
currentTrack++;
- }
-
- 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));
- currentAudioTrack++;
- }
-
- int currentSubtitleTrack = 1;
- foreach (SourceSubtitleTrack track in title.SubtitleList)
- {
- SubtitleType convertedType = new SubtitleType();
-
+ }
+
+ 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));
+ currentAudioTrack++;
+ }
+
+ int currentSubtitleTrack = 1;
+ foreach (SourceSubtitleTrack track in title.SubtitleList)
+ {
+ SubtitleType convertedType = new SubtitleType();
+
switch (track.Source)
{
case 0:
@@ -538,7 +538,6 @@ namespace HandBrake.ApplicationServices.Services.Scan
break;
}
-
bool canBurn = HBFunctions.hb_subtitle_can_burn(track.Source) > 0;
bool canSetForcedOnly = HBFunctions.hb_subtitle_can_force(track.Source) > 0;