Browse Source

Revert "add debug logs for other video folder scanning (#1369)"

This reverts commit 5e573461f3.
pull/1371/head
Jason Dove 2 years ago
parent
commit
22a13cb1b3
  1. 26
      ErsatzTV.Scanner/Core/Metadata/OtherVideoFolderScanner.cs

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

@ -70,8 +70,6 @@ public class OtherVideoFolderScanner : LocalFolderScanner, IOtherVideoFolderScan @@ -70,8 +70,6 @@ public class OtherVideoFolderScanner : LocalFolderScanner, IOtherVideoFolderScan
{
try
{
_logger.LogDebug("Starting to scan other videos library");
decimal progressSpread = progressMax - progressMin;
var foldersCompleted = 0;
@ -81,7 +79,6 @@ public class OtherVideoFolderScanner : LocalFolderScanner, IOtherVideoFolderScan @@ -81,7 +79,6 @@ public class OtherVideoFolderScanner : LocalFolderScanner, IOtherVideoFolderScan
if (ShouldIncludeFolder(libraryPath.Path) && allFolders.Add(libraryPath.Path))
{
_logger.LogDebug("Will scan library path {Path}", libraryPath.Path);
folderQueue.Enqueue(libraryPath.Path);
}
@ -90,11 +87,9 @@ public class OtherVideoFolderScanner : LocalFolderScanner, IOtherVideoFolderScan @@ -90,11 +87,9 @@ public class OtherVideoFolderScanner : LocalFolderScanner, IOtherVideoFolderScan
.Filter(allFolders.Add)
.OrderBy(identity))
{
_logger.LogDebug("Will scan subdirectory {Folder}", folder);
folderQueue.Enqueue(folder);
}
_logger.LogDebug("Found {Count} folders to scan", folderQueue.Count);
while (folderQueue.Count > 0)
{
if (cancellationToken.IsCancellationRequested)
@ -113,7 +108,6 @@ public class OtherVideoFolderScanner : LocalFolderScanner, IOtherVideoFolderScan @@ -113,7 +108,6 @@ public class OtherVideoFolderScanner : LocalFolderScanner, IOtherVideoFolderScan
cancellationToken);
string otherVideoFolder = folderQueue.Dequeue();
_logger.LogDebug("Scanning folder {Folder}", otherVideoFolder);
foldersCompleted++;
var filesForEtag = _localFileSystem.ListFiles(otherVideoFolder).ToList();
@ -128,7 +122,6 @@ public class OtherVideoFolderScanner : LocalFolderScanner, IOtherVideoFolderScan @@ -128,7 +122,6 @@ public class OtherVideoFolderScanner : LocalFolderScanner, IOtherVideoFolderScan
.Filter(allFolders.Add)
.OrderBy(identity))
{
_logger.LogDebug("Will scan subdirectory {Subdirectory}", subdirectory);
folderQueue.Enqueue(subdirectory);
}
@ -138,23 +131,9 @@ public class OtherVideoFolderScanner : LocalFolderScanner, IOtherVideoFolderScan @@ -138,23 +131,9 @@ public class OtherVideoFolderScanner : LocalFolderScanner, IOtherVideoFolderScan
.HeadOrNone();
// skip folder if etag matches
string knownEtag = await knownFolder.Map(f => f.Etag ?? string.Empty).IfNoneAsync(string.Empty);
if (!allFiles.Any() || knownEtag == etag)
if (!allFiles.Any() || await knownFolder.Map(f => f.Etag ?? string.Empty).IfNoneAsync(string.Empty) ==
etag)
{
if (allFiles.Count == 0)
{
_logger.LogDebug("Skipping folder {Folder} with no files", otherVideoFolder);
}
else
{
_logger.LogDebug(
"Skipping folder {Folder} with file count {FileCount} and new etag {Etag} vs last etag {KnownEtag}",
otherVideoFolder,
allFiles.Count,
etag,
knownEtag);
}
continue;
}
@ -199,7 +178,6 @@ public class OtherVideoFolderScanner : LocalFolderScanner, IOtherVideoFolderScan @@ -199,7 +178,6 @@ public class OtherVideoFolderScanner : LocalFolderScanner, IOtherVideoFolderScan
if (!hasErrors)
{
await _libraryRepository.SetEtag(libraryPath, knownFolder, otherVideoFolder, etag);
_logger.LogDebug("Done scanning folder {Folder}", otherVideoFolder);
}
}

Loading…
Cancel
Save