From 81d642abe33e9839c946bcccdeebf0ca8f8bd81f Mon Sep 17 00:00:00 2001 From: GinoGinocchio Date: Mon, 10 Jul 2023 00:58:47 -0500 Subject: [PATCH] Removing unnecesary empty and null validations --- MediaBrowser.Providers/MediaInfo/AudioFileProber.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MediaBrowser.Providers/MediaInfo/AudioFileProber.cs b/MediaBrowser.Providers/MediaInfo/AudioFileProber.cs index defa7994a..dd3cecc52 100644 --- a/MediaBrowser.Providers/MediaInfo/AudioFileProber.cs +++ b/MediaBrowser.Providers/MediaInfo/AudioFileProber.cs @@ -280,27 +280,27 @@ namespace MediaBrowser.Providers.MediaInfo audio.Genres = tags.Genres.Distinct(StringComparer.OrdinalIgnoreCase).ToArray(); } - if (!audio.TryGetProviderId("MusicBrainzArtist", out var artistValue) || string.IsNullOrEmpty(artistValue)) + if (!audio.TryGetProviderId("MusicBrainzArtist", out _)) { audio.SetProviderId(MetadataProvider.MusicBrainzArtist, tags.MusicBrainzArtistId); } - if (!audio.TryGetProviderId("MusicBrainzAlbumArtist", out var albumArtistValue) || string.IsNullOrEmpty(albumArtistValue)) + if (!audio.TryGetProviderId("MusicBrainzAlbumArtist", out _)) { audio.SetProviderId(MetadataProvider.MusicBrainzAlbumArtist, tags.MusicBrainzReleaseArtistId); } - if (!audio.TryGetProviderId("MusicBrainzAlbum", out var albumValue) || string.IsNullOrEmpty(albumValue)) + if (!audio.TryGetProviderId("MusicBrainzAlbum", out _)) { audio.SetProviderId(MetadataProvider.MusicBrainzAlbum, tags.MusicBrainzReleaseId); } - if (!audio.TryGetProviderId("MusicBrainzReleaseGroup", out var releaseGroupValue) || string.IsNullOrEmpty(releaseGroupValue)) + if (!audio.TryGetProviderId("MusicBrainzReleaseGroup", out _)) { audio.SetProviderId(MetadataProvider.MusicBrainzReleaseGroup, tags.MusicBrainzReleaseGroupId); } - if (!audio.TryGetProviderId("MusicBrainzTrack", out var trackValue) || string.IsNullOrEmpty(trackValue)) + if (!audio.TryGetProviderId("MusicBrainzTrack", out _)) { audio.SetProviderId(MetadataProvider.MusicBrainzTrack, tags.MusicBrainzTrackId); }