private async Task <string> DetermineArtistFolder(AudioMetaData metaData, bool doJustInfo) { var artist = await ArtistLookupEngine.GetByName(metaData, !doJustInfo).ConfigureAwait(false); if (!artist.IsSuccess) { return(null); } try { return(artist.Data.ArtistFileFolder(Configuration)); } catch (Exception ex) { Logger.LogError(ex, ex.Serialize()); } return(null); }
private async Task <string> DetermineReleaseFolder(string artistFolder, AudioMetaData metaData, bool doJustInfo, int?submissionId) { var artist = await ArtistLookupEngine.GetByName(metaData, !doJustInfo).ConfigureAwait(false); if (!artist.IsSuccess) { return(null); } _artistId = artist.Data.RoadieId; var release = await ReleaseLookupEngine.GetByName(artist.Data, metaData, !doJustInfo, submissionId : submissionId).ConfigureAwait(false); if (!release.IsSuccess) { return(null); } _releaseId = release.Data.RoadieId; release.Data.ReleaseDate = SafeParser.ToDateTime(release.Data.ReleaseYear ?? metaData.Year); if (release.Data.ReleaseYear.HasValue && release.Data.ReleaseYear != metaData.Year) { Logger.LogWarning($"Found Release `{release.Data}` has different Release Year than MetaData Year `{metaData}`"); } return(release.Data.ReleaseFileFolder(artistFolder)); }