Browse Source

add some debug logging for music video scanning (#2408)

pull/2409/head
Jason Dove 11 months ago committed by GitHub
parent
commit
f124554fba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      ErsatzTV.Scanner/Core/Metadata/LocalMetadataProvider.cs
  2. 2
      ErsatzTV.Scanner/Core/Metadata/Nfo/NfoReaderBase.cs

8
ErsatzTV.Scanner/Core/Metadata/LocalMetadataProvider.cs

@ -1338,7 +1338,14 @@ public class LocalMetadataProvider : ILocalMetadataProvider
{ {
try try
{ {
_logger.LogDebug("Reading artist metadata from {NfoFileName}", nfoFileName);
_logger.LogDebug("Total memory: {TotalMemory}", GC.GetTotalMemory(false));
Either<BaseError, ArtistNfo> maybeNfo = await _artistNfoReader.ReadFromFile(nfoFileName); Either<BaseError, ArtistNfo> maybeNfo = await _artistNfoReader.ReadFromFile(nfoFileName);
_logger.LogDebug("Finished reading artist metadata from {NfoFileName}", nfoFileName);
_logger.LogDebug("Total memory: {TotalMemory}", GC.GetTotalMemory(false));
foreach (BaseError error in maybeNfo.LeftToSeq()) foreach (BaseError error in maybeNfo.LeftToSeq())
{ {
_logger.LogInformation( _logger.LogInformation(
@ -1368,6 +1375,7 @@ public class LocalMetadataProvider : ILocalMetadataProvider
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogInformation(ex, "Failed to read artist nfo metadata from {Path}", nfoFileName); _logger.LogInformation(ex, "Failed to read artist nfo metadata from {Path}", nfoFileName);
_logger.LogDebug("Total memory on failure: {TotalMemory}", GC.GetTotalMemory(false));
_client.Notify(ex); _client.Notify(ex);
return None; return None;
} }

2
ErsatzTV.Scanner/Core/Metadata/Nfo/NfoReaderBase.cs

@ -5,7 +5,7 @@ namespace ErsatzTV.Scanner.Core.Metadata.Nfo;
public abstract partial class NfoReaderBase public abstract partial class NfoReaderBase
{ {
protected static readonly byte[] Buffer = new byte[8 * 1024 * 1024]; protected static readonly byte[] Buffer = new byte[8192];
protected static readonly Regex Pattern = ControlCharacters(); protected static readonly Regex Pattern = ControlCharacters();
protected static readonly XmlReaderSettings Settings = protected static readonly XmlReaderSettings Settings =

Loading…
Cancel
Save