Close

December 10, 2016

Adventures in .NET Core: ID3 tags

I hope to post little notes, experiments and tips here as I work with some of the latest and greatest in .NET.

For a side project, I decided to write an application to clean up my Music directory and hopefully rectify it using Napster (formerly Rhapsody) to correct tags and patch holes.

Since .NET Core is relatively new (just out of RC in fact) I decided a little utility like this is a perfect test case to see if a .NET Core console application is actually suited to this type of personal utility. It seems though that it’s just not there yet.

I ran into some roadblocks that just aren’t worth routing around:

Issue #1: Googling help for anything involving “.NET Core” is a nightmare because a large number of libraries with extensions on NuGet were called “Core” in some way or another.

The library that I found and wanted to use is called ID3.NET (and the main package is ID3, referred to as the “Core” library.) This has nothing to do with .NET Core and won’t currently work. Same deal with TagLib.

Issue #2: For something as niche as ID3 tag reading there are only a couple libraries available in C# and none of them work in .NET Core
This is related to Issue #1 but it’s not a common task so there’s not a lot of options for libraries. I’m sure node.js has something by now if I really need portability but since this is just a side project there’s no reason to jump through hoops.


Issue #3: You can’t easily send command line parameters to the debug version of the console application

This one was more annoying than anything else, but you can’t set debug arguments in the properties for the project. There’s workarounds with files and stuff, but it’s just more effort and shows a lack of polish.

Workaround:

I could read the mp3 file headers directly and calculate the bitrate but since some of my media is older and might be in ID3 version 1, 2 or 3 I’d have to parse a lot of data and duplicate a lot of the work in these free libraries. Not worth it!!

Sometimes it doesn’t make sense to force a technology choice when the community support is just not there. I guess for now I’ll be writing this utility in regular old .NET!

Leave a Reply

Your email address will not be published. Required fields are marked *