Skip to content

Commit acb4abb

Browse files
CodeWithMadecriptor
authored andcommitted
CombinedTag: Add MusicBrainzRecordingId, MusicBrainzWorkId
1 parent 31919c6 commit acb4abb

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

src/TaglibSharp/CombinedTag.cs

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,6 +1408,82 @@ public override string MusicBrainzTrackId {
14081408
tag.MusicBrainzTrackId = value;
14091409
}
14101410
}
1411+
1412+
/// <summary>
1413+
/// Gets and sets the MusicBrainz Recording ID.
1414+
/// </summary>
1415+
/// <value>
1416+
/// A <see cref="string" /> containing the MusicBrainz
1417+
/// RecordingID for the media described by the
1418+
/// current instance or null if no value is present.
1419+
/// </value>
1420+
/// <remarks>
1421+
/// <para>When getting the value, the child tags are looped
1422+
/// through in order and the first non-<see langword="null" />
1423+
/// and non-empty value is returned.</para>
1424+
/// <para>When setting the value, it is stored in each child
1425+
/// tag.</para>
1426+
/// </remarks>
1427+
/// <seealso cref="Tag.MusicBrainzRecordingId" />
1428+
public override string MusicBrainzRecordingId {
1429+
get {
1430+
foreach (Tag tag in tags) {
1431+
if (tag == null)
1432+
continue;
1433+
1434+
string value = tag.MusicBrainzRecordingId;
1435+
1436+
if (value != null)
1437+
return value;
1438+
}
1439+
1440+
return null;
1441+
}
1442+
1443+
set {
1444+
foreach (Tag tag in tags)
1445+
if (tag != null)
1446+
tag.MusicBrainzRecordingId = value;
1447+
}
1448+
}
1449+
1450+
/// <summary>
1451+
/// Gets and sets the MusicBrainz Work ID.
1452+
/// </summary>
1453+
/// <value>
1454+
/// A <see cref="string" /> containing the MusicBrainz
1455+
/// WorkID for the media described by the
1456+
/// current instance or null if no value is present.
1457+
/// </value>
1458+
/// <remarks>
1459+
/// <para>When getting the value, the child tags are looped
1460+
/// through in order and the first non-<see langword="null" />
1461+
/// and non-empty value is returned.</para>
1462+
/// <para>When setting the value, it is stored in each child
1463+
/// tag.</para>
1464+
/// </remarks>
1465+
/// <seealso cref="Tag.MusicBrainzWorkId" />
1466+
public override string MusicBrainzWorkId {
1467+
get {
1468+
foreach (Tag tag in tags) {
1469+
if (tag == null)
1470+
continue;
1471+
1472+
string value = tag.MusicBrainzWorkId;
1473+
1474+
if (value != null)
1475+
return value;
1476+
}
1477+
1478+
return null;
1479+
}
1480+
1481+
set {
1482+
foreach (Tag tag in tags)
1483+
if (tag != null)
1484+
tag.MusicBrainzWorkId = value;
1485+
}
1486+
}
14111487

14121488
/// <summary>
14131489
/// Gets and sets the MusicBrainz Disc ID.

0 commit comments

Comments
 (0)