From 19679c9d8cedcd91506dab44734dfa9fe97ca50b Mon Sep 17 00:00:00 2001 From: sr55 Date: Fri, 30 Dec 2022 18:41:36 +0000 Subject: [PATCH] WinGui: Fix the Drive listing on the source panel. Note, you must point to VIDEO_TS for folder scans. Fixes #4771 --- win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 0e9ccb8fa5e7..0a641d28fa28 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -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;