Jump to content
Xtreme .Net Talk

Recommended Posts

  • Administrators
Posted (edited)

Result of being bored in a hotel a few nights ago. Fairly rough and ready (only took a few hours and several guiness to throw together) but should handle ID3 v1 tags fine.

Supports ID3 v2 tags more or less : Provides property access for the more common tags but should read and write all tags. Text based tags are untested with anything but ASCII content.

Error handling may be a bit lacking feel free to PM me with any critical problems and I'll try to find time to fix them ;)

 

Can be used something like

MP3TagLibrary.ID3v2Tag test = new MP3TagLibrary.ID3v2Tag();
MessageBox.Show(test.Artist);	//should display artist
test.Artist= "This will overwrite the real tag - be careful";
test.Update();	//save changes back.

 

Includes a basic user interface to manipulate tags. As per usual code is provided with no guarantees at all.

EDIT: this version appears to work better

SimpleTagUI.zip

Edited by PlausiblyDamp

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

  • 9 months later...
  • Administrators
Posted

I was never really satisfied with the above code as it was very rushed and as already stated written with much Guiness being consumed, however it met my needs at the time...

 

After reading Test-Driven Development in Microsoft .NET as recomended by our own Nerseus I felt it was a good a topic as any to try and put the techniques into practice.

 

So far it only supports v1 and v1.1 tags (2.0 is a big leap forward - but may happen in the future). The library is written in C# as are the included tests, there is also a very basic UI written in VB.Net (I didn't realise I was using VB until I had pretty much finished the front end and couldn't be bothered doing it again in C#...)

 

If you want to run the tests yourself you will need to obtain a copy of NUnit and the test mp3s can be obtained Here.

 

In a debug release it will compile 'as is', to do a release build you need to provide a strong name key file - path is in the assemblyinfo.cs. If you use the link to the above test files you can edit the path to them in the MP3TagTests.config file.

 

I do intend to continue developing this to support v2 tags but will probably continue development with VS 2005 as this will allow me to take advantage of generics to manange collections of frame types and also an easier time with the improved IDE (refactoring and intellisense improvements).

MP3Tags.zip

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...