Skip to content

Commit

Permalink
WinGui: Fix the Drive listing on the source panel. Note, you must poi…
Browse files Browse the repository at this point in the history
…nt to VIDEO_TS for folder scans. Fixes #4771
  • Loading branch information
sr55 committed Dec 30, 2022
1 parent c8b3fd7 commit 19679c9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
Expand Up @@ -1861,14 +1861,20 @@ public void ProcessDrive(object item)
{
if (item.GetType() == typeof(DriveInformation))
{
this.StartScan(((DriveInformation)item).RootDirectory, 0);
string path = ((DriveInformation)item).RootDirectory;
string videoDir = Path.Combine(path, "VIDEO_TS");

this.StartScan(Directory.Exists(videoDir) ? videoDir : path, 0);
}
else if (item.GetType() == typeof(SourceMenuItem))
{
DriveInformation driveInfo = ((SourceMenuItem)item).Tag as DriveInformation;
if (driveInfo != null)
{
this.StartScan(driveInfo.RootDirectory, this.TitleSpecificScan);
string path = driveInfo.RootDirectory;
string videoDir = Path.Combine(driveInfo.RootDirectory, "VIDEO_TS");

this.StartScan(Directory.Exists(videoDir) ? videoDir : path, this.TitleSpecificScan);
}

this.ShowSourceSelection = false;
Expand Down

0 comments on commit 19679c9

Please sign in to comment.