INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Smartlist: Musicbrainz style checker  (Read 2102 times)

mark_h

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1854
Smartlist: Musicbrainz style checker
« on: January 21, 2009, 07:16:27 am »

Has anybody done any work with smartlists to check their tags against Musicbrainz style guides?  I'm working on a set and wondered if I was reinventing the wheel?  As an example, here is my current smartlist for checking the use of 'The' against [album] and [name]:

[Media Type]=[Audio]

(([=isequal([name],/ The , 7)]=1 and [=isequal([name],/) The , 7)]=0 and [=isequal([name],/, The , 7)]=0 and [=isequal([name],& The , 7)]=0 and [=isequal([name],. The , 7)]=0 and [=isequal([name],- The , 7)]=0 and [=isequal([name],// The , 7)]=0 and [=isequal([name],: The , 7)]=0)

or

([=isequal([album],/ The , 7)]=1 and [=isequal([album],/) The , 7)]=0 and [=isequal([album],. The , 7)]=0 and [=isequal([album],/, The , 7)]=0 and [=isequal([album],// The , 7)]=0 and [=isequal([album],& The , 7)]=0 and [=isequal([album],- The , 7)]=0 and [=isequal([album],: The , 7)]=0))

:D

This catches most of the misuses of 'The' according to Musicbrainz style guides; I have a couple of extra sublists for specific cases that cannot be included in the above list.

When a list of entries is highlighted for fixing it's a simple case of using the rename tools to fix the highlighted files.

I'm leaving [artist] alone for now as MB tends to follow artist intent and automatic corrections need to be avoided.

I currently have similar lists for other words that require attention and am now attempting to optimise and extend coverage.

I'm doing this as I have hundreds of CD's imported prior to the time I started using MB for all my imports and I'd rather do the work inside of MC for those albums to avoid the issues or reimporting for tag changes.

Cheers,

Mark
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Smartlist: Musicbrainz style checker
« Reply #1 on: January 22, 2009, 12:53:32 am »

Maybe worth mentioning...
Using "7" you're specifying an exact match. If you use "8", you'll get returns on lower case "the" as well.

This feels like a lot of work... What's the payback from using MB tags?

ADDiCT

  • Regular Member
  • World Citizen
  • ***
  • Posts: 235
  • I'm a bad llama!
Re: Smartlist: Musicbrainz style checker
« Reply #2 on: January 22, 2009, 01:35:43 am »

Not a solution for the problem, but maybe an idea for a different approach:

For MB tags, i'm using a workflow where i analyze files with Picard, and then let it update the tags. After that, i'm using Mp3tag to read the tags and export them to a MPL file (the export file will not be a "real" XML file with entity encoding etc., but it will import correctly into MC, special characters and all). The Mp3tag export is setup to export certain tag fields with the names of dedicated MC library fields i've created (i'm using names like "_mb_album_name", "_mb_artist_name", etc.). After importing the MPL into MC, i'm updating tags in MC to get back "my" tag values. After that, i can create smartlists to compare "my" tag fields to the ones in the dedicated "_mb_*" fields. I've found and corrected lots of errors in my "Artist" fields using this workflow.

Marko: MB's tags are usually of very high quality. Most albums are stored with consistant naming of various fields. Last.FM is (more or less) using MB's artist naming, so once you have your "Artist" fields in synch with MB's naming, you can use MPL export/scripting to get Artist info from Last.FM. I've been fiddling a lot with this stuff during the last months, and i have some pretty cool stuff in MC now. A "Last.FM Similar Artist" function, bios and album info from LFM and AMG, etc. . It's quite cool to have artist and album info from various sources available via a customized "Playing Now" Track-Info page.
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Smartlist: Musicbrainz style checker
« Reply #3 on: January 22, 2009, 02:20:02 am »

After that, i'm using Mp3tag to read the tags and export them to a MPL file (the export file will not be a "real" XML file with entity encoding etc., but it will import correctly into MC, special characters and all).

Curious as to the format of this xml file that mp3tag exports ?

It's quite cool to have artist and album info from various sources available via a customized "Playing Now" Track-Info page.

This is the one area where Amarok is better than MC or did i misunderstand ?
Logged

mark_h

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1854
Re: Smartlist: Musicbrainz style checker
« Reply #4 on: January 22, 2009, 03:10:06 am »

Maybe worth mentioning...
Using "7" you're specifying an exact match. If you use "8", you'll get returns on lower case "the" as well.

Exact match is what I need here...  find all 'The' that should in fact be 'the'...  no point in finding correct 'the' in this case...

Quote
This feels like a lot of work... What's the payback from using MB tags?

Consistency across my library and consistency on other sites where users tag correctly, eg LastFM.

It also improves my smartlist skills :D

Mark
Logged

ADDiCT

  • Regular Member
  • World Citizen
  • ***
  • Posts: 235
  • I'm a bad llama!
Re: Smartlist: Musicbrainz style checker
« Reply #5 on: January 22, 2009, 04:15:51 pm »

Curious as to the format of this xml file that mp3tag exports ?
This is how my export configuration file looks like:
Code: [Select]
$filename(%ALBUM%.mpl,utf-8)<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MPL Version="2.0" Title="Data Import">
$loop(%track%)<Item>
<Field Name="Filename">%_folderpath%%_filename_ext%</Field>
<Field Name="_mb_album">%ALBUM%</Field>
<Field Name="_mb_albumartistsort">%ALBUMARTISTSORT%</Field>
<Field Name="_mb_artist">%ARTIST%</Field>
<Field Name="_mb_asin">%ASIN%</Field>
<Field Name="_mb_band">%BAND%</Field>
<Field Name="_mb_catalognumber">%CATALOGNUMBER%</Field>
<Field Name="_mb_involvedpeople">%INVOLVEDPEOPLE%</Field>
<Field Name="_mb_itunescompilation">%ITUNESCOMPILATION%</Field>
<Field Name="_mb_album_artist_id">%MUSICBRAINZ ALBUM ARTIST ID%</Field>
<Field Name="_mb_album_id">%MUSICBRAINZ ALBUM ID%</Field>
<Field Name="_mb_album_release_country">%MUSICBRAINZ ALBUM RELEASE COUNTRY%</Field>
<Field Name="_mb_album_status">%MUSICBRAINZ ALBUM STATUS%</Field>
<Field Name="_mb_album_type">%MUSICBRAINZ ALBUM TYPE%</Field>
<Field Name="_mb_artist_id">%MUSICBRAINZ ARTIST ID%</Field>
<Field Name="_mb_trackid">%MUSICBRAINZ_TRACKID%</Field>
<Field Name="_mb_puid">%MUSICIP PUID%</Field>
<Field Name="_mb_performersortorder">%PERFORMERSORTORDER%</Field>
<Field Name="_mb_publisher">%PUBLISHER%</Field>
<Field Name="_mb_title">%TITLE%</Field>
<Field Name="_mb_track">%TRACK%</Field>
<Field Name="_mb_year">%YEAR%</Field>
<Field Name="_mb_barcode">%BARCODE%</Field>
<Field Name="_mb_mixartist">%MIXARTIST%</Field>
<Field Name="_mb_musiciancredits">%MUSICIANCREDITS%</Field>
</Item>
$loopend()</MPL>
Which translates to (had to shorten the text to one track):
Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MPL Version="2.0" Title="Data Import">
<Item>
<Field Name="Filename">M:\_audio\Alt. Pop\Imogen Heap\I Megaphone (Japan Bonus Tracks, 2002)\001 - Imogen Heap - Getting Scared.mp3</Field>
<Field Name="_mb_album">i Megaphone</Field>
<Field Name="_mb_albumartistsort">Heap, Imogen</Field>
<Field Name="_mb_artist">Imogen Heap</Field>
<Field Name="_mb_asin">B00005ULES</Field>
<Field Name="_mb_band">Imogen Heap</Field>
<Field Name="_mb_catalognumber"></Field>
<Field Name="_mb_involvedpeople"></Field>
<Field Name="_mb_itunescompilation"></Field>
<Field Name="_mb_album_artist_id">328d146c-79f1-4eb6-9e40-8ee5710c14e5</Field>
<Field Name="_mb_album_id">bb105a92-744e-4279-8533-ad0c4df75a01</Field>
<Field Name="_mb_album_release_country">JP</Field>
<Field Name="_mb_album_status">official</Field>
<Field Name="_mb_album_type">album</Field>
<Field Name="_mb_artist_id">328d146c-79f1-4eb6-9e40-8ee5710c14e5</Field>
<Field Name="_mb_trackid">2910b545-3931-49aa-b9bd-fe5e3a778ddfp</Field>
<Field Name="_mb_puid"></Field>
<Field Name="_mb_performersortorder">Heap, Imogen</Field>
<Field Name="_mb_publisher"></Field>
<Field Name="_mb_title">Getting Scared</Field>
<Field Name="_mb_track">1/14</Field>
<Field Name="_mb_year">2002-01</Field>
<Field Name="_mb_barcode"></Field>
<Field Name="_mb_mixartist"></Field>
<Field Name="_mb_musiciancredits"></Field>
</Item>
</MPL>
Mp3tag won't correctly encode special characters to entities (like &quot;), but it saves the export file as UTF-8, so special characters are imported correctly into MC (MC doesn't seem to validate XML files, which is good in this case).

This is the one area where Amarok is better than MC or did i misunderstand ?
Dunno, never used Amarok, i've only seen it some months ago on a friend's SUSE system. I think metadata retrieval and management will be the next big thing in media players, and OSS is probably on the forefront of this development.
Logged

mark_h

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1854
Re: Smartlist: Musicbrainz style checker
« Reply #6 on: January 23, 2009, 03:06:58 am »

Interesting stuff ADDicT!

For now, I've completed my smartlists - about 30 in total, which reveal inconsistencies in my library compared to Musicbrainz style.  Revealed a couple thousand tracks that I've now cleaned using inline editing, eg

=replace([album],/ The /,/ the / )

MC rocks.

Mark
Logged
Pages: [1]   Go Up