mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-10-03 09:09:42 +02:00
Fixed: Do not use Count/LongCount when Any can be used
This commit is contained in:
@@ -192,8 +192,6 @@ dotnet_diagnostic.CA1823.severity = suggestion
|
|||||||
dotnet_diagnostic.CA1824.severity = suggestion
|
dotnet_diagnostic.CA1824.severity = suggestion
|
||||||
dotnet_diagnostic.CA1825.severity = suggestion
|
dotnet_diagnostic.CA1825.severity = suggestion
|
||||||
dotnet_diagnostic.CA1826.severity = suggestion
|
dotnet_diagnostic.CA1826.severity = suggestion
|
||||||
dotnet_diagnostic.CA1827.severity = suggestion
|
|
||||||
dotnet_diagnostic.CA1828.severity = suggestion
|
|
||||||
dotnet_diagnostic.CA2000.severity = suggestion
|
dotnet_diagnostic.CA2000.severity = suggestion
|
||||||
dotnet_diagnostic.CA2002.severity = suggestion
|
dotnet_diagnostic.CA2002.severity = suggestion
|
||||||
dotnet_diagnostic.CA2007.severity = suggestion
|
dotnet_diagnostic.CA2007.severity = suggestion
|
||||||
|
@@ -16,7 +16,7 @@ namespace NzbDrone.Common.OAuth
|
|||||||
{
|
{
|
||||||
var parameters = this.Where(p => p.Name.Equals(name));
|
var parameters = this.Where(p => p.Name.Equals(name));
|
||||||
|
|
||||||
if (parameters.Count() == 0)
|
if (!parameters.Any())
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@@ -205,7 +205,7 @@ namespace NzbDrone.Core.Extras.Metadata.Consumers.Xbmc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fanarts.Count() > 0)
|
if (fanarts.Any())
|
||||||
{
|
{
|
||||||
var fanartElement = new XElement("fanart");
|
var fanartElement = new XElement("fanart");
|
||||||
foreach (var fanart in fanarts)
|
foreach (var fanart in fanarts)
|
||||||
|
@@ -23,7 +23,7 @@ namespace NzbDrone.Core.HealthCheck.Checks
|
|||||||
var ptpIndexerOldSettings = ptpIndexers
|
var ptpIndexerOldSettings = ptpIndexers
|
||||||
.Where(i => (i.Settings as PassThePopcornSettings).APIUser.IsNullOrWhiteSpace()).Select(i => i.Name);
|
.Where(i => (i.Settings as PassThePopcornSettings).APIUser.IsNullOrWhiteSpace()).Select(i => i.Name);
|
||||||
|
|
||||||
if (ptpIndexerOldSettings.Count() > 0)
|
if (ptpIndexerOldSettings.Any())
|
||||||
{
|
{
|
||||||
return new HealthCheck(GetType(), HealthCheckResult.Warning, string.Format(_localizationService.GetLocalizedString("PtpOldSettingsCheckMessage"), string.Join(", ", ptpIndexerOldSettings)));
|
return new HealthCheck(GetType(), HealthCheckResult.Warning, string.Format(_localizationService.GetLocalizedString("PtpOldSettingsCheckMessage"), string.Join(", ", ptpIndexerOldSettings)));
|
||||||
}
|
}
|
||||||
|
@@ -316,7 +316,7 @@ namespace NzbDrone.Core.MediaFiles.MovieImport.Manual
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (groupedTrackedDownload.Select(c => c.ImportResult).Count(c => c.Result == ImportResultType.Imported) >= 1)
|
if (groupedTrackedDownload.Select(c => c.ImportResult).Any(c => c.Result == ImportResultType.Imported))
|
||||||
{
|
{
|
||||||
trackedDownload.State = TrackedDownloadState.Imported;
|
trackedDownload.State = TrackedDownloadState.Imported;
|
||||||
_eventAggregator.PublishEvent(new DownloadCompletedEvent(trackedDownload, importMovie.Id));
|
_eventAggregator.PublishEvent(new DownloadCompletedEvent(trackedDownload, importMovie.Id));
|
||||||
|
Reference in New Issue
Block a user