Add filesystem logging for .NET 6

This commit is contained in:
Matt Nadareski
2022-04-18 12:42:18 -07:00
parent 15a3be2e66
commit 7fd2562cb5
3 changed files with 7 additions and 6 deletions

View File

@@ -74,6 +74,7 @@
- .NET 6.0 and Cleanup
- Remove .NET Core 3.1 from test project for now
- Remove .NET Core 3.1 entirely
- Add filesystem logging for .NET 6
### 2.3 (2022-02-05)
- Start overhauling Redump information pulling, again

View File

@@ -242,12 +242,12 @@ namespace MPF.Core.Data
double dvdMaxSize = 9 * Math.Pow(1024, 3);
// Attempt to determine media type by size
if (driveInfo.TotalSize < cdMaxSize)
return (MediaType.CDROM, null);
else if (driveInfo.TotalSize < dvdMaxSize)
return (MediaType.DVD, null);
if (this.TotalSize < cdMaxSize)
return (MediaType.CDROM, $"Detected filesystem: {this.DriveFormat}");
else if (this.TotalSize < dvdMaxSize)
return (MediaType.DVD, $"Detected filesystem: {this.DriveFormat}");
else
return (MediaType.BluRay, null);
return (MediaType.BluRay, $"Detected filesystem: {this.DriveFormat}");
// TODO: In order to get the disc type, Aaru.Core will need to be included as a
// package. Unfortunately, it currently has a conflict with one of the required libraries:

View File

@@ -832,7 +832,7 @@ namespace MPF.UI.ViewModels
// If we got an error message, post it to the log
if (errorMessage != null)
App.Logger.VerboseLogLn($"Error in detecting media type: {errorMessage}");
App.Logger.VerboseLogLn($"Message from detecting media type: {errorMessage}");
// If we got either an error or no media, default to the current System default
if (detectedMediaType == null)