From 0267c048841faa315296dfd973e901a8bc41d96d Mon Sep 17 00:00:00 2001 From: ta264 Date: Mon, 25 Jul 2022 21:17:31 +0100 Subject: [PATCH] cleanup (cherry picked from commit 0ad8fc7bee8cf3549899fd31c46bd653878ef99c) --- .../ImportLists/ImportListSyncService.cs | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/NzbDrone.Core/ImportLists/ImportListSyncService.cs b/src/NzbDrone.Core/ImportLists/ImportListSyncService.cs index 57ae1b530..ba23d8093 100644 --- a/src/NzbDrone.Core/ImportLists/ImportListSyncService.cs +++ b/src/NzbDrone.Core/ImportLists/ImportListSyncService.cs @@ -70,7 +70,7 @@ namespace NzbDrone.Core.ImportLists private List SyncList(ImportListDefinition definition) { - _logger.ProgressInfo(string.Format("Starting Import List Refresh for List {0}", definition.Name)); + _logger.ProgressInfo("Starting Import List Refresh for List {0}", definition.Name); var rssReleases = _listFetcherAndParser.FetchSingleList(definition); @@ -292,7 +292,7 @@ namespace NzbDrone.Core.ImportLists var existingArtist = _artistService.FindById(report.ArtistMusicBrainzId); // Check to see if artist excluded - var excludedArtist = listExclusions.Where(s => s.ForeignId == report.ArtistMusicBrainzId).SingleOrDefault(); + var excludedArtist = listExclusions.SingleOrDefault(s => s.ForeignId == report.ArtistMusicBrainzId); // Check to see if artist in import var existingImportArtist = artistsToAdd.Find(i => i.ForeignArtistId == report.ArtistMusicBrainzId); @@ -353,16 +353,7 @@ namespace NzbDrone.Core.ImportLists public void Execute(ImportListSyncCommand message) { - List processed; - - if (message.DefinitionId.HasValue) - { - processed = SyncList(_importListFactory.Get(message.DefinitionId.Value)); - } - else - { - processed = SyncAll(); - } + var processed = message.DefinitionId.HasValue ? SyncList(_importListFactory.Get(message.DefinitionId.Value)) : SyncAll(); _eventAggregator.PublishEvent(new ImportListSyncCompleteEvent(processed)); }