Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions src/TaglibSharp.Tests/TaggingFormats/Id3V2Test.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1024,6 +1024,35 @@ public void TestPublisher ()
}
}


[Test]
public void TestEncodedBy ()
{
Tag tag = new Tag ();
for (byte version = 2; version <= 4; version++) {
tag.Version = version;

TagTestWithSave (ref tag, delegate (Tag t, string m) {
Assert.IsTrue (t.IsEmpty, "Initial (IsEmpty): " + m);
Assert.IsNull (t.EncodedBy, "Initial (Null): " + m);
});

tag.EncodedBy = val_sing;

TagTestWithSave (ref tag, delegate (Tag t, string m) {
Assert.IsFalse (t.IsEmpty, "Value Set (!IsEmpty): " + m);
Assert.AreEqual (val_sing, t.EncodedBy, "Value Set (!Null): " + m);
});

tag.EncodedBy = string.Empty;

TagTestWithSave (ref tag, delegate (Tag t, string m) {
Assert.IsTrue (t.IsEmpty, "Value Cleared (IsEmpty): " + m);
Assert.IsNull (t.EncodedBy, "Value Cleared (Null): " + m);
});
}
}

[Test]
public void TestISRC ()
{
Expand Down
1 change: 1 addition & 0 deletions src/TaglibSharp/Id3v2/FrameTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ static class FrameType
public static readonly ReadOnlyByteVector WPUB = "WPUB";
public static readonly ReadOnlyByteVector WXXX = "WXXX";
public static readonly ReadOnlyByteVector ETCO = "ETCO";
public static readonly ReadOnlyByteVector TENC = "TENC"; // Encoded By Frame.
public static readonly ReadOnlyByteVector MVNM = "MVNM"; // Movement Name
public static readonly ReadOnlyByteVector MVIN = "MVIN"; // Movement Number/Count
}
Expand Down
14 changes: 14 additions & 0 deletions src/TaglibSharp/Id3v2/Tag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2299,6 +2299,20 @@ public override string Publisher {
set { SetTextFrame (FrameType.TPUB, value); }
}

/// <summary>
/// Gets and sets the TENC (Encoded by) of the song.
/// </summary>
/// <value>
/// A <see cref="string" /> object containing the TENC of the song.
/// </value>
/// <remarks>
/// This property is implemented using the "TENC" field.
/// </remarks>
public string EncodedBy {
get { return GetTextAsString (FrameType.TENC); }
set { SetTextFrame (FrameType.TENC, value); }
}

/// <summary>
/// Gets and sets the ISRC (International Standard Recording Code) of the song.
/// </summary>
Expand Down
Loading