Browse Source

add more logging to other video library scans (#1658)

pull/1659/head
Jason Dove 1 year ago committed by GitHub
parent
commit
340ab61a26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 15
      ErsatzTV.Scanner/Core/Metadata/OtherVideoFolderScanner.cs

15
ErsatzTV.Scanner/Core/Metadata/OtherVideoFolderScanner.cs

@ -161,18 +161,27 @@ public class OtherVideoFolderScanner : LocalFolderScanner, IOtherVideoFolderScan @@ -161,18 +161,27 @@ public class OtherVideoFolderScanner : LocalFolderScanner, IOtherVideoFolderScan
otherVideoFolder);
bool hasMissingFiles = allFiles.Any(allMissingFiles.Contains);
bool isSameEtag = knownFolder.Etag == etag && !hasMissingFiles;
bool isSameEtag = !hasMissingFiles && knownFolder.Etag == etag;
_logger.LogDebug(
"Scanning other video folder {Folder}; etag {Etag}; last etag {LastEtag}; has missing files {HasMissingFiles}",
"Scanning other video folder {Folder}; file count: {Count}, etag: {LastEtag} => {Etag}; has missing files: {HasMissingFiles}",
otherVideoFolder,
allFiles.Count,
etag,
knownFolder.Etag,
hasMissingFiles);
// skip empty folder
if (allFiles.Count == 0)
{
_logger.LogDebug("Skipping empty other videos folder");
continue;
}
// skip folder if etag matches
if (allFiles.Count == 0 || isSameEtag)
if (isSameEtag)
{
_logger.LogDebug("Skipping unchanged other videos folder, that contains no missing items");
continue;
}

Loading…
Cancel
Save