Suggestion - Sort function for multivalue tag-fields


#1

I think that Mp3tag needs a sort function (ascending, descending) for sorting a multivalue meta tag-field.

DD.20100830.0849.CEST


$sort(x,sep)
$sort(x,sep)
Feature request: Import tags from clipboard
Alphabetical order (Composer's field)
#2

another useful suggestion


#3

How about not limiting it to multivalue fields?

$stringsort(string,delimeter)

$stringsort('b, a, c',', ') -> a, b, c

$stringsort($meta_sep(artist,\\),\\) -> a\\b\\c


#4

Yes.

Using a delimiter string opens much more usability than a single delimiter character.
The splitting of the given string can simply be realized like it is done by the .NET Framework Class Library Regex.Split Method (String, String).

I would like to see a third optional parameter, which indicates how to sort, ascending or descending.

$StringSort(StringBase,StringDelimiter[,SortDirection])

The parameter "SortDirection" can be an integer of {0,1} with "0=sort ascending" as the default sorting behaviour.

DD.20100921.1423.CEST


#5

Very useful function!

crosslinking to --> German feature suggestion thread $sort(x,sep)
because - despite research - I couldn't find this thread here before posting the same idea.

Differences:

  • I named the function $sort instead of $stringsort for bevity.
  • I named the 3rd param (i.e. sortdirection) a-z and z-a instead of 0/1 for better human readability and user friendliness.
  • With $sortz or $zsort I suggested a possible alternative for inverse sorting in order to keep $sort a 2 param function.

#6

+1

Practical example - I periodically run my albums against MusicBrainz to see if their records have got anything useful added. By "backing up" the main fields that differ from what I want after such a run, and then "restoring" them just before the next one, the "remove perfect matches" plugin leaves only a list with updates.

However the sort ordering randomness is preventing the perfect matching, easy enough to visually scan when it's just a few dozen albums, but when the whole collection's being batched makes the process pretty painful.


#7

doing any multi-album processing using tag sources in mp3tag is extremely painful because there's no real way of automating it so even if semi-automated via auto-it your ass is still glued to the chair album by album.


#8

Not sure if you're addressing me or just complaining generally. If the former, I'm using Picard, which seems pretty quick so far, especially when most of the albums being tested do match perfectly and can be made to disappear with a single click using the plugin I mentioned.

Note in this case I've discovered that converting my multi-valued tags from single-field delimited to true multi-field solves that particular problem, as Picard apparently can auto-sort for comparison purposes for the latter but not the former.

So I've created a "convert to multi" Action group that lists all my (potentially) multi-valued fields and does this:

$regexp(%contentgroup%,'\s*[;]\s*','\\\\')

and a "convert to single" one that does this:

$meta_sep(CONTENTGROUP,; )

and Bob's your uncle.

Anyone know of a way to call one Action group from another?


#9

That kind of sorting would be really helpful.