Browse Source

fix scanner crash caused by invalid mtime (#934)

pull/935/head
Jason Dove 4 years ago committed by GitHub
parent
commit
612b9e6524
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 13
      ErsatzTV.Core/Metadata/LocalFileSystem.cs

1
CHANGELOG.md

@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Fixed
- When all audio streams are selected with `HLS Direct`, explicitly copy them without transcoding
- This only happens when the channel does not have a `Preferred Audio Language`
- Fix scanner crash caused by invalid mtime
## [0.6.6-beta] - 2022-08-17
### Fixed

13
ErsatzTV.Core/Metadata/LocalFileSystem.cs

@ -33,8 +33,17 @@ public class LocalFileSystem : ILocalFileSystem @@ -33,8 +33,17 @@ public class LocalFileSystem : ILocalFileSystem
return Unit.Default;
}
public DateTime GetLastWriteTime(string path) =>
Try(File.GetLastWriteTimeUtc(path)).IfFail(() => SystemTime.MinValueUtc);
public DateTime GetLastWriteTime(string path)
{
try
{
return File.GetLastWriteTimeUtc(path);
}
catch
{
return SystemTime.MinValueUtc;
}
}
public bool IsLibraryPathAccessible(LibraryPath libraryPath) =>
Directory.Exists(libraryPath.Path);

Loading…
Cancel
Save