Skip to content

Commit 1c81281

Browse files
CodeWithMadecriptor
authored andcommitted
- Fix Wrong Frame used for MusicBrainz Track Id - See #304
- Add MusicBrainzRecordingId - Add MusicBrainzWorkId
1 parent 32dff43 commit 1c81281

File tree

3 files changed

+73
-3
lines changed

3 files changed

+73
-3
lines changed

.github/workflows/ubuntu.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v1
17+
- uses: actions/checkout@v3
1818
- name: Setup .NET Core
19-
uses: actions/setup-dotnet@v1
19+
uses: actions/setup-dotnet@v3
2020
with:
2121
dotnet-version: 6.0.302
2222
- name: Build with dotnet

src/TaglibSharp/Id3v2/Tag.cs

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1973,14 +1973,48 @@ public override string MusicBrainzReleaseArtistId {
19731973
/// instance, or null if no value is present.
19741974
/// </value>
19751975
/// <remarks>
1976-
/// This property is implemented using the "UFID:http://musicbrainz.org" frame.
1976+
/// This property is implemented using the "TXXX:MusicBrainz Release Track Id" frame.
19771977
/// http://musicbrainz.org/doc/PicardTagMapping
19781978
/// </remarks>
19791979
public override string MusicBrainzTrackId {
1980+
get { return GetUfidText ("MusicBrainz Release Track Id"); }
1981+
set { SetUfidText ("MusicBrainz Release Track Id", value); }
1982+
}
1983+
1984+
/// <summary>
1985+
/// Gets and sets the MusicBrainz RecordingID
1986+
/// </summary>
1987+
/// <value>
1988+
/// A <see cref="string" /> containing the MusicBrainz
1989+
/// RecordingID for the media described by the current
1990+
/// instance, or null if no value is present.
1991+
/// </value>
1992+
/// <remarks>
1993+
/// This property is implemented using the "UFID:http://musicbrainz.org" frame.
1994+
/// http://musicbrainz.org/doc/PicardTagMapping
1995+
/// </remarks>
1996+
public override string MusicBrainzRecordingId {
19801997
get { return GetUfidText ("http://musicbrainz.org"); }
19811998
set { SetUfidText ("http://musicbrainz.org", value); }
19821999
}
19832000

2001+
/// <summary>
2002+
/// Gets and sets the MusicBrainz WorkID
2003+
/// </summary>
2004+
/// <value>
2005+
/// A <see cref="string" /> containing the MusicBrainz
2006+
/// WorkID for the media described by the current
2007+
/// instance, or null if no value is present.
2008+
/// </value>
2009+
/// <remarks>
2010+
/// This property is implemented using the "TXXX:MusicBrainz Work Id" frame.
2011+
/// http://musicbrainz.org/doc/PicardTagMapping
2012+
/// </remarks>
2013+
public override string MusicBrainzWorkId {
2014+
get { return GetUfidText ("MusicBrainz Work Id"); }
2015+
set { SetUfidText ("MusicBrainz Work Id", value); }
2016+
}
2017+
19842018
/// <summary>
19852019
/// Gets and sets the MusicBrainz DiscID
19862020
/// </summary>

src/TaglibSharp/Tag.cs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,42 @@ public virtual string MusicBrainzTrackId {
848848
set { }
849849
}
850850

851+
/// <summary>
852+
/// Gets and sets the MusicBrainz Recording ID of the media represented by
853+
/// the current instance.
854+
/// </summary>
855+
/// <value>
856+
/// A <see cref="string" /> containing the MusicBrainz RecordingID of the
857+
/// media represented by the current instance or an empty
858+
/// array if no value is present.
859+
/// </value>
860+
/// <remarks>
861+
/// <para>This field represents the MusicBrainz RecordingID, and is used
862+
/// to uniquely identify a particular recording.</para>
863+
/// </remarks>
864+
public virtual string MusicBrainzRecordingId {
865+
get { return null; }
866+
set { }
867+
}
868+
869+
/// <summary>
870+
/// Gets and sets the MusicBrainz Work ID of the media represented by
871+
/// the current instance.
872+
/// </summary>
873+
/// <value>
874+
/// A <see cref="string" /> containing the MusicBrainz WorkID of the
875+
/// media represented by the current instance or an empty
876+
/// array if no value is present.
877+
/// </value>
878+
/// <remarks>
879+
/// <para>This field represents the MusicBrainz WorkID, and is used
880+
/// to uniquely identify a particular work.</para>
881+
/// </remarks>
882+
public virtual string MusicBrainzWorkId {
883+
get { return null; }
884+
set { }
885+
}
886+
851887
/// <summary>
852888
/// Gets and sets the MusicBrainz Disc ID of the media represented by
853889
/// the current instance.

0 commit comments

Comments
 (0)