Skip to content

Releases: JeevanJames/Id3

ID3.NET 0.5.0-beta.1

05 May 10:49
Compare
Choose a tag to compare
ID3.NET 0.5.0-beta.1 Pre-release
Pre-release

Changelog

  • The project has been migrated from CodePlex to GitHub.

  • [Breaking on certain platforms] Updated target frameworks to netstandard2.0 and net40. The library can now be used in .NET Core, Xamarin and UWP projects in addition to .NET Framework 4.0 and above. It is no longer a portable class library (PCL).

    • Some platforms like Windows Phone 7.5 and Silverlight are no longer supported.
  • The code have been cleaned-up and refactored.

    • Project file and directory has been changed a little to make it more understandable
    • XML doc comments are being added
  • [Breaking] The Mp3Stream class from Id3 and Mp3File class from Id3.Files have been merged into a Mp3 class that resides in the Id3 package.

    • The Id3.Files package will be repurposed for file-based utilities, including the existing FileNamer class and FileNameInfoProvider information provider.
  • All frame properties (except collection frames), have been made read/write (see below for more details).

  • [Breaking] The Id3TagFamily enum members have been renamed from FileStartTag and FileEndTag to Version2X and Version1X respectively.

  • New Mp3 method called UpdateTag has been added, which writes the tag with a WriteConflictAction of Replace. This was the most common usage of WriteTag, and so deserved a dedicated method.

Read/write frame properties

In earlier version, the syntax for reading and writing frame properties was inconsistent, since they were read-only:

// Reading album value
var albumName = tag.Album;

// Writing album value. Need to use Value property explicitly
tag.Album.Value = albumName;

In this release, the properties have been made read/write and implicit cast operators have been added for implicitly converting their values to instances of the frame object.

tag.Album = albumName;

You can also use the frame class constructor to create an instance of the frame explicitly. New constructor overloads have been added to each frame class to set one or more important properties.

// Constructor overload
tag.Album = new AlbumFrame(albumName);

// Constructor overload and object initializer
tag.Album = new AlbumFrame(albumName) { EncodingType = Id3TextEncoding.Unicode };

// Default constructor and object initializer
tag.Album = new AlbumFrame
{
    Value = albumName,
    EncodingType = Id3TextEncoding.Unicode
};

The original way is still supported:

tag.Album.Value = albumName;