Skip to content

Commit 713494e

Browse files
committed
Return null instead of string.Empty for empty MusicBrainzArtistId and MusicBrainzReleaseArtistId
1 parent 0b18bda commit 713494e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/TaglibSharp/Ogg/XiphComment.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,7 @@ public override DateTime? DateTagged {
12161216
public override string MusicBrainzArtistId {
12171217
get {
12181218
string[] artistIds = GetField ("MUSICBRAINZ_ARTISTID");
1219-
return string.Join ("/", artistIds);
1219+
return artistIds.Length == 0 ? null : string.Join ("/", artistIds);
12201220
}
12211221
set {
12221222
string[] artistIds = value.Split ('/');
@@ -1273,7 +1273,7 @@ public override string MusicBrainzReleaseId {
12731273
public override string MusicBrainzReleaseArtistId {
12741274
get {
12751275
string[] releaseArtistIds = GetField ("MUSICBRAINZ_ALBUMARTISTID");
1276-
return string.Join ("/", releaseArtistIds);
1276+
return releaseArtistIds.Length == 0 ? null : string.Join ("/", releaseArtistIds);
12771277
}
12781278
set {
12791279
string[] releaseArtistIds = value.Split ('/');

0 commit comments

Comments
 (0)