Clicking Liberate button on a liberated item navigates to that audio file

This commit is contained in:
Robert McRackan 2019-12-06 09:53:07 -05:00
parent f9917d4064
commit 7bb4853903

View File

@ -122,8 +122,18 @@ namespace LibationWinForm
var productId = GetGridEntry(e.RowIndex).GetBook().AudibleProductId; var productId = GetGridEntry(e.RowIndex).GetBook().AudibleProductId;
var backupBook = BookLiberation.ProcessorAutomationController.GetWiredUpBackupBook((_, __) => RefreshRow(productId)); // if liberated, open explorer to file
await BookLiberation.ProcessorAutomationController.RunSingleBackupAsync(backupBook, productId); if (FileManager.AudibleFileStorage.Audio.Exists(productId))
{
var filePath = FileManager.AudibleFileStorage.Audio.GetPath(productId);
System.Diagnostics.Process.Start("explorer.exe", $"/select, \"{filePath}\"");
}
// else liberate
else
{
var backupBook = BookLiberation.ProcessorAutomationController.GetWiredUpBackupBook((_, __) => RefreshRow(productId));
await BookLiberation.ProcessorAutomationController.RunSingleBackupAsync(backupBook, productId);
}
} }
#endregion #endregion