Skip to content

Commit 7430409

Browse files
author
RandomEngy
committed
Change some logic and help text to stop assuming you have to pick the VIDEO_TS folder for a DVD scan. This should make previewing DVD titles on the Queue Multiple Titles window possible when you've picked the root DVD directory.
1 parent aa1d682 commit 7430409

3 files changed

Lines changed: 5 additions & 13 deletions

File tree

VidCoder/Utilities/Utilities.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,14 +416,14 @@ public static string GetSourceNameFile(string videoFile)
416416

417417
public static string GetSourceNameFolder(string videoFolder)
418418
{
419-
// If the directory is not VIDEO_TS, take its name for the source name (Blu-ray)
419+
// If the directory is not VIDEO_TS, take its name for the source name (user picked root directory)
420420
var videoDirectory = new DirectoryInfo(videoFolder);
421421
if (videoDirectory.Name != "VIDEO_TS")
422422
{
423423
return videoDirectory.Name;
424424
}
425425

426-
// If the directory is named VIDEO_TS, take the source name from the parent folder (DVD)
426+
// If the directory is named VIDEO_TS, take the source name from the parent folder (user picked VIDEO_TS folder on DVD)
427427
DirectoryInfo parentDirectory = videoDirectory.Parent;
428428
if (parentDirectory == null || parentDirectory.Root.FullName == parentDirectory.FullName)
429429
{

VidCoder/ViewModel/MainViewModel.cs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public bool SetSourceFromFolder()
221221
this.SourceSelectionExpanded = false;
222222
}
223223

224-
string folderPath = FileService.Instance.GetFolderName(Settings.Default.LastVideoTSFolder, "Pick the DVD's VIDEO_TS folder or the Blu-ray's root folder.");
224+
string folderPath = FileService.Instance.GetFolderName(Settings.Default.LastVideoTSFolder, "Pick a DVD or Blu-ray folder.");
225225

226226
// Make sure we get focus back after displaying the dialog.
227227
WindowManager.FocusWindow(this);
@@ -260,15 +260,7 @@ public bool SetSourceFromDvd(DriveInformation driveInfo)
260260
}
261261

262262
this.SourceName = driveInfo.VolumeLabel;
263-
264-
if (driveInfo.DiscType == DiscType.Dvd)
265-
{
266-
this.SourcePath = Path.Combine(driveInfo.RootDirectory, "VIDEO_TS");
267-
}
268-
else
269-
{
270-
this.SourcePath = driveInfo.RootDirectory;
271-
}
263+
this.SourcePath = driveInfo.RootDirectory;
272264

273265
this.SelectedSource = new SourceOption { Type = SourceType.Dvd, DriveInfo = driveInfo };
274266
this.StartScan(this.SourcePath);

VidCoder/ViewModel/QueueTitlesDialogViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public bool PlayAvailable
163163
{
164164
get
165165
{
166-
return Path.GetFileName(this.main.SourcePath) == "VIDEO_TS";
166+
return Path.GetFileName(this.main.SourcePath) == "VIDEO_TS" || Directory.Exists(Path.Combine(this.main.SourcePath, "VIDEO_TS"));
167167
}
168168
}
169169

0 commit comments

Comments
 (0)