From 8109dfb0b7bda5ea8adb05553cdad99eff902f99 Mon Sep 17 00:00:00 2001 From: Tom Andrews Date: Sun, 10 Mar 2019 22:20:24 +0000 Subject: [PATCH] Fixed: Remove unused GetAlbum following importer rewrite --- src/NzbDrone.Core/Parser/ParsingService.cs | 46 ---------------------- 1 file changed, 46 deletions(-) diff --git a/src/NzbDrone.Core/Parser/ParsingService.cs b/src/NzbDrone.Core/Parser/ParsingService.cs index 101592cb4..340bbd7a0 100644 --- a/src/NzbDrone.Core/Parser/ParsingService.cs +++ b/src/NzbDrone.Core/Parser/ParsingService.cs @@ -18,7 +18,6 @@ namespace NzbDrone.Core.Parser RemoteAlbum Map(ParsedAlbumInfo parsedAlbumInfo, SearchCriteriaBase searchCriteria = null); RemoteAlbum Map(ParsedAlbumInfo parsedAlbumInfo, int artistId, IEnumerable albumIds); List GetAlbums(ParsedAlbumInfo parsedAlbumInfo, Artist artist, SearchCriteriaBase searchCriteria = null); - Album GetAlbum(Artist artist, ParsedTrackInfo parsedTrackInfo); // Music stuff here Album GetLocalAlbum(string filename, Artist artist); @@ -236,50 +235,5 @@ namespace NzbDrone.Core.Parser return tracksInAlbum.Count == 1 ? _albumService.GetAlbum(tracksInAlbum.First().AlbumId) : null; } - - public Album GetAlbum(Artist artist, ParsedTrackInfo parsedTrackInfo) - { - Album album = null; - - if (parsedTrackInfo == null) - { - return null; - } - - if (parsedTrackInfo.ReleaseMBId.IsNotNullOrWhiteSpace()) - { - album = _albumService.FindAlbumByRelease(parsedTrackInfo.ReleaseMBId); - } - - if (album == null && parsedTrackInfo.AlbumTitle.IsNullOrWhiteSpace()) - { - _logger.Debug("Album title could not be parsed for {0}", parsedTrackInfo); - return null; - } - - var cleanAlbumTitle = Parser.CleanAlbumTitle(parsedTrackInfo.AlbumTitle); - _logger.Debug("Cleaning Album title of common matching issues. Cleaned album title is '{0}'", cleanAlbumTitle); - - if (album == null) - { - album = _albumService.FindByTitle(artist.ArtistMetadataId, cleanAlbumTitle); - } - - if (album == null) - { - _logger.Debug("Trying inexact album match for {0}", parsedTrackInfo); - album = _albumService.FindByTitleInexact(artist.ArtistMetadataId, cleanAlbumTitle); - } - - if (album == null) - { - _logger.Debug("Parsed album title not found in Db for {0}", parsedTrackInfo); - return null; - } - - _logger.Debug("Album {0} selected for {1}", album, parsedTrackInfo); - - return album; - } } }