Skip to content

Commit

Permalink
- Fix Wrong Frame used for MusicBrainz Track Id - See mono#304
Browse files Browse the repository at this point in the history
- Add MusicBrainzRecordingId
- Add MusicBrainzWorkId
  • Loading branch information
CodeWithMa committed Jul 28, 2023
1 parent c853d26 commit d427478
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.302
- name: Build with dotnet
Expand Down
36 changes: 35 additions & 1 deletion src/TaglibSharp/Id3v2/Tag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1973,14 +1973,48 @@ IEnumerator IEnumerable.GetEnumerator ()
/// instance, or null if no value is present.
/// </value>
/// <remarks>
/// This property is implemented using the "UFID:http://musicbrainz.org" frame.
/// This property is implemented using the "TXXX:MusicBrainz Release Track Id" frame.
/// http://musicbrainz.org/doc/PicardTagMapping
/// </remarks>
public override string MusicBrainzTrackId {
get { return GetUfidText ("MusicBrainz Release Track Id"); }
set { SetUfidText ("MusicBrainz Release Track Id", value); }
}

/// <summary>
/// Gets and sets the MusicBrainz RecordingID
/// </summary>
/// <value>
/// A <see cref="string" /> containing the MusicBrainz
/// RecordingID for the media described by the current
/// instance, or null if no value is present.
/// </value>
/// <remarks>
/// This property is implemented using the "UFID:http://musicbrainz.org" frame.
/// http://musicbrainz.org/doc/PicardTagMapping
/// </remarks>
public override string MusicBrainzRecordingId {
get { return GetUfidText ("http://musicbrainz.org"); }
set { SetUfidText ("http://musicbrainz.org", value); }
}

/// <summary>
/// Gets and sets the MusicBrainz WorkID
/// </summary>
/// <value>
/// A <see cref="string" /> containing the MusicBrainz
/// WorkID for the media described by the current
/// instance, or null if no value is present.
/// </value>
/// <remarks>
/// This property is implemented using the "TXXX:MusicBrainz Work Id" frame.
/// http://musicbrainz.org/doc/PicardTagMapping
/// </remarks>
public override string MusicBrainzWorkId {
get { return GetUfidText ("MusicBrainz Work Id"); }
set { SetUfidText ("MusicBrainz Work Id", value); }
}

/// <summary>
/// Gets and sets the MusicBrainz DiscID
/// </summary>
Expand Down
36 changes: 36 additions & 0 deletions src/TaglibSharp/Tag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,42 @@ public abstract class Tag
set { }
}

/// <summary>
/// Gets and sets the MusicBrainz Recording ID of the media represented by
/// the current instance.
/// </summary>
/// <value>
/// A <see cref="string" /> containing the MusicBrainz RecordingID of the
/// media represented by the current instance or an empty
/// array if no value is present.
/// </value>
/// <remarks>
/// <para>This field represents the MusicBrainz RecordingID, and is used
/// to uniquely identify a particular recording.</para>
/// </remarks>
public virtual string MusicBrainzRecordingId {
get { return null; }
set { }
}

/// <summary>
/// Gets and sets the MusicBrainz Work ID of the media represented by
/// the current instance.
/// </summary>
/// <value>
/// A <see cref="string" /> containing the MusicBrainz WorkID of the
/// media represented by the current instance or an empty
/// array if no value is present.
/// </value>
/// <remarks>
/// <para>This field represents the MusicBrainz WorkID, and is used
/// to uniquely identify a particular work.</para>
/// </remarks>
public virtual string MusicBrainzWorkId {
get { return null; }
set { }
}

/// <summary>
/// Gets and sets the MusicBrainz Disc ID of the media represented by
/// the current instance.
Expand Down

0 comments on commit d427478

Please sign in to comment.