Let's stop logging every single step
This commit is contained in:
parent
179711b930
commit
0b870c7db7
@ -368,7 +368,6 @@ public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
|
|||||||
|
|
||||||
_logger.LogDebug("Reading index.html from {Path}", indexPath);
|
_logger.LogDebug("Reading index.html from {Path}", indexPath);
|
||||||
var contents = File.ReadAllText(indexPath);
|
var contents = File.ReadAllText(indexPath);
|
||||||
_logger.LogDebug("Successfully read index.html");
|
|
||||||
|
|
||||||
var scriptTag = "<script src=\"configurationpage?name=skip-intro-button.js\"></script>";
|
var scriptTag = "<script src=\"configurationpage?name=skip-intro-button.js\"></script>";
|
||||||
|
|
||||||
@ -381,12 +380,10 @@ public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
|
|||||||
|
|
||||||
// Inject a link to the script at the end of the <head> section.
|
// Inject a link to the script at the end of the <head> section.
|
||||||
// A regex is used here to ensure the replacement is only done once.
|
// A regex is used here to ensure the replacement is only done once.
|
||||||
_logger.LogDebug("Injecting script tag");
|
|
||||||
var headEnd = new Regex("</head>", RegexOptions.IgnoreCase);
|
var headEnd = new Regex("</head>", RegexOptions.IgnoreCase);
|
||||||
contents = headEnd.Replace(contents, scriptTag + "</head>", 1);
|
contents = headEnd.Replace(contents, scriptTag + "</head>", 1);
|
||||||
|
|
||||||
// Write the modified file contents
|
// Write the modified file contents
|
||||||
_logger.LogDebug("Saving modified file");
|
|
||||||
File.WriteAllText(indexPath, contents);
|
File.WriteAllText(indexPath, contents);
|
||||||
|
|
||||||
_logger.LogInformation("Skip intro button successfully added");
|
_logger.LogInformation("Skip intro button successfully added");
|
||||||
|
@ -57,9 +57,7 @@ public class QueueManager
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.LogInformation(
|
_logger.LogInformation("Running enqueue of items in library {Name}", folder.Name);
|
||||||
"Running enqueue of items in library {Name}",
|
|
||||||
folder.Name);
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -114,7 +112,7 @@ public class QueueManager
|
|||||||
if (config.AnalysisLengthLimit != 10 || config.AnalysisPercent != 25 || config.MinimumIntroDuration != 15)
|
if (config.AnalysisLengthLimit != 10 || config.AnalysisPercent != 25 || config.MinimumIntroDuration != 15)
|
||||||
{
|
{
|
||||||
_logger.LogInformation(
|
_logger.LogInformation(
|
||||||
"Analysis settings have been changed to: {Percent}%/{Minutes}m and a minimum of {Minimum}s",
|
"Analysis settings have been changed to: {Percent}% / {Minutes}m and a minimum of {Minimum}s",
|
||||||
config.AnalysisPercent,
|
config.AnalysisPercent,
|
||||||
config.AnalysisLengthLimit,
|
config.AnalysisLengthLimit,
|
||||||
config.MinimumIntroDuration);
|
config.MinimumIntroDuration);
|
||||||
@ -140,8 +138,6 @@ public class QueueManager
|
|||||||
IsVirtualItem = false
|
IsVirtualItem = false
|
||||||
};
|
};
|
||||||
|
|
||||||
_logger.LogDebug("Getting items");
|
|
||||||
|
|
||||||
var items = _libraryManager.GetItemList(query, false);
|
var items = _libraryManager.GetItemList(query, false);
|
||||||
|
|
||||||
if (items is null)
|
if (items is null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user