mirror of
https://github.com/Radarr/Radarr
synced 2025-02-23 06:41:20 +00:00
New: Improve accepted and rejected release logging
Closes #8236 Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
parent
a7ba1a6454
commit
5727e7c43b
2 changed files with 14 additions and 10 deletions
|
@ -141,11 +141,11 @@ private IEnumerable<DownloadDecision> GetDecisions(List<ReleaseInfo> reports, Se
|
||||||
{
|
{
|
||||||
if (decision.Rejections.Any())
|
if (decision.Rejections.Any())
|
||||||
{
|
{
|
||||||
_logger.Debug("Release rejected for the following reasons: {0}", string.Join(", ", decision.Rejections));
|
_logger.Debug("Release '{0}' from '{1}' rejected for the following reasons: {2}", report.Title, report.Indexer, string.Join(", ", decision.Rejections));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_logger.Debug("Release accepted");
|
_logger.Debug("Release '{0}' from '{1}' accepted", report.Title, report.Indexer);
|
||||||
}
|
}
|
||||||
|
|
||||||
yield return decision;
|
yield return decision;
|
||||||
|
|
|
@ -36,13 +36,13 @@ public bool IsUpgradable(Profile profile, QualityModel currentQuality, List<Cust
|
||||||
|
|
||||||
if (qualityCompare > 0)
|
if (qualityCompare > 0)
|
||||||
{
|
{
|
||||||
_logger.Debug("New item has a better quality");
|
_logger.Debug("New item has a better quality. Existing: {0}. New: {1}", currentQuality, newQuality);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qualityCompare < 0)
|
if (qualityCompare < 0)
|
||||||
{
|
{
|
||||||
_logger.Debug("Existing item has better quality, skipping");
|
_logger.Debug("Existing item has better quality, skipping. Existing: {0}. New: {1}", currentQuality, newQuality);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,6 +53,7 @@ public bool IsUpgradable(Profile profile, QualityModel currentQuality, List<Cust
|
||||||
if (downloadPropersAndRepacks != ProperDownloadTypes.DoNotPrefer &&
|
if (downloadPropersAndRepacks != ProperDownloadTypes.DoNotPrefer &&
|
||||||
qualityRevisionCompare > 0)
|
qualityRevisionCompare > 0)
|
||||||
{
|
{
|
||||||
|
_logger.Debug("New item has a better quality revision, skipping. Existing: {0}. New: {1}", currentQuality, newQuality);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,19 +64,21 @@ public bool IsUpgradable(Profile profile, QualityModel currentQuality, List<Cust
|
||||||
if (downloadPropersAndRepacks != ProperDownloadTypes.DoNotPrefer &&
|
if (downloadPropersAndRepacks != ProperDownloadTypes.DoNotPrefer &&
|
||||||
qualityRevisionCompare < 0)
|
qualityRevisionCompare < 0)
|
||||||
{
|
{
|
||||||
_logger.Debug("Existing item has a better quality revision, skipping");
|
_logger.Debug("Existing item has a better quality revision, skipping. Existing: {0}. New: {1}", currentQuality, newQuality);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newFormatScore <= currentFormatScore)
|
if (newFormatScore <= currentFormatScore)
|
||||||
{
|
{
|
||||||
_logger.Debug("New item's custom formats [{0}] do not improve on [{1}], skipping",
|
_logger.Debug("New item's custom formats [{0}] ({1}) do not improve on [{2}] ({3}), skipping",
|
||||||
newCustomFormats.ConcatToString(),
|
newCustomFormats.ConcatToString(),
|
||||||
currentCustomFormats.ConcatToString());
|
newFormatScore,
|
||||||
|
currentCustomFormats.ConcatToString(),
|
||||||
|
currentFormatScore);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.Debug("New item has a custom format upgrade");
|
_logger.Debug("New item has a better custom format score");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,7 +118,7 @@ public bool CutoffNotMet(Profile profile, QualityModel currentQuality, List<Cust
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.Debug("Existing item meets cut-off. skipping.");
|
_logger.Debug("Existing item meets cut-off. skipping. Existing: {0}", currentQuality);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -124,9 +127,10 @@ public bool IsRevisionUpgrade(QualityModel currentQuality, QualityModel newQuali
|
||||||
{
|
{
|
||||||
var compare = newQuality.Revision.CompareTo(currentQuality.Revision);
|
var compare = newQuality.Revision.CompareTo(currentQuality.Revision);
|
||||||
|
|
||||||
|
// Comparing the quality directly because we don't want to upgrade to a proper for a webrip from a webdl or vice versa
|
||||||
if (currentQuality.Quality == newQuality.Quality && compare > 0)
|
if (currentQuality.Quality == newQuality.Quality && compare > 0)
|
||||||
{
|
{
|
||||||
_logger.Debug("New quality is a better revision for existing quality");
|
_logger.Debug("New quality is a better revision for existing quality. Existing: {0}. New: {1}", currentQuality, newQuality);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue