mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-10-02 08:47:59 +02:00
Fixed: Do not use Count/LongCount when Any can be used
This commit is contained in:
@@ -205,7 +205,7 @@ namespace NzbDrone.Core.Extras.Metadata.Consumers.Xbmc
|
||||
}
|
||||
}
|
||||
|
||||
if (fanarts.Count() > 0)
|
||||
if (fanarts.Any())
|
||||
{
|
||||
var fanartElement = new XElement("fanart");
|
||||
foreach (var fanart in fanarts)
|
||||
|
@@ -23,7 +23,7 @@ namespace NzbDrone.Core.HealthCheck.Checks
|
||||
var ptpIndexerOldSettings = ptpIndexers
|
||||
.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)));
|
||||
}
|
||||
|
@@ -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;
|
||||
_eventAggregator.PublishEvent(new DownloadCompletedEvent(trackedDownload, importMovie.Id));
|
||||
|
Reference in New Issue
Block a user