Sort by Path, etc


#1

Hi I'm using v2.49 (but have been using mp3tag for a while).

This is a support question I guess, but I keep getting a "no permission to post in this forum" error over there.

When I have a few albums selected (say I have a Led Zeppelin folder, and in that folder the albums Led Zeppelin, Led Zeppelin II, Led Zeppelin III and Led Zeppelin IV) and do click PATH to Sort By Path it always lists the first album last, as if not having a number at the end makes it come last?

So I end up with

Led Zeppelin II
(its tracks)
Led Zeppelin III
(its tracks)
Led Zeppelin IV
(its tracks)
Led Zeppelin
(its tracks)

like that. It doesn't do it if I rename Led Zeppelin to Led Zeppelin I though, but I dont want to call it Led Zeppelin I.

It does it with every numbered album sequence actually. Soundtracks (Spider-Man 2, Spider-Man) it happens a lot to.

The reason I ask is that WMP12 does exactly the same thing, so they dont display properly in there. I'm using ID3 v2.3 tags (2.4 wont display at all in WMP). So if its a missing tag of some description, and can get Mp3Tag to sort it properly, I should be able to get WMP12 to do it too...in theory..

If anyone can help (or even shift this post into the support forum) it would be great :smiley:


#2

Yeah, I get the same thing. It just has something to do with some sort library being used that sorts a space ahead of no character at all.

A small annoyance. Is this keeping you from being able to do something in Mp3tag?


#3

No, no, not at all. I only just noticed it did it in Mp3Tag today... but it's always done it in Windows Media Player, put the un-numbered album last (when its usually the first, if not always) and thought if there was a way it could get sorted properly (ie. some advanced tag I'm not aware of) maybe it can get sorted in WMP too?


#4

Ah, I see why it sorts like that now... The variable %_path% contains the full path to the file, including the filename, so it includes an additional backslash and the name. So we have:

E:\Flac\Led Zeppelin\Led Zeppelin II\01 Whole Lotta Love.flac ...
E:\Flac\Led Zeppelin\Led Zeppelin II\09 Bring It On Home.flac
E:\Flac\Led Zeppelin\Led Zeppelin III\01 Immigrant Song.flac ...
E:\Flac\Led Zeppelin\Led Zeppelin III\10 Hats Off To (Roy) Harper.flac
E:\Flac\Led Zeppelin\Led Zeppelin IV [Zoso]\01 Black Dog.flac ...
E:\Flac\Led Zeppelin\Led Zeppelin IV [Zoso]\08 When The Levee Breaks.flac
E:\Flac\Led Zeppelin\Led Zeppelin\01 Good Times Bad Times.flac ...
E:\Flac\Led Zeppelin\Led Zeppelin\09 How Many More Times.flac

Since a space sorts before a backslash (""), it explains why the album with no numbers sorts last. To fix it, you can redefine the column definition. Right-click the column header, select 'Customize-columns', find 'Path' and change the 'Sort by' to:

$regexp(%_path%,^(.*)(\\\\)(.*)$,$1  $3)

This turns the last backslash in %_path% into two spaces. Should handle most, if not all cases.


#5

Ahh I see, thanks for that. I had a feeling it might be some sort of code I could enter. Tried that and it worked like a charm, so thank you :slight_smile:

I know its a long shot, but is there anyway of making this file-centric, so that WMP will display it properly?