Home User Forums SongKong Music Tagger Jaikoz Music Tagger Albunack Music Service

Sunday 10 January 2016

Limiting long filenames when matching Classical releases

The Problem with Long Filenames

SongKong and Jaikoz both allow you to rename your music files based on their metadata, and this is an important step of keeping your music collection in sync. The total file length is guaranteed by both to be no longer than the maximum allowed on your OS, for example the maximum on Windows is the relatively low 259 characters

However you may want the maximum to be shorter than that, some of my PS Audio customers have alerted me to a couple of reasons why: 

1. Classical music matched to MusicBrainz can sometimes use a rather long value for the album field because editors shoehorn extra information into album title such as additional musicians involved as here:

or to capture additional details such as here:

According to the style guidelines this should not usually happen but sometimes it does

2. Some players such as JRiver Media Centre just do not like filenames this long

My proposed solution

So I added setting a user defined limit for the filepath length option to my list of improvements to make, this would simply truncate the filename if it was too long.

A Better Idea

But then another customer JazzNut came up with an even better idea, would it be possible to add this rule to the rename mask ?

Yes, of course - this is how I did it in SongKong

1. On the File Naming tab, set the Filename Masks dropdown so it is the same as your chosen rename mask, and open it up for editing by selecting the Edit button. 

2. Then use the length function to test the length of the album field, and the substring function to output a truncated version of the album field.

i.e (album.length>100 ? album.substring(0,100):album) to give new mask, then select OK  to save the changes.

3. Repeat the process to modify the compilation rename mask if this is different to the rename mask

You can use this approach to limit the length of any field, artist and title fields can get long as well, you can use the same approach in Jaikoz as well.

No comments:

Jthink blog Jthink Facebook page google_plus Jthink YouTube channel Email Paul at Jthink Subscribe to Weekly Newsletter