Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Tracks not sorted correctly by textools (Read 966 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Tracks not sorted correctly by textools

Hello everyone. I'm trying to output a list of all the albums in my library. I've found the Text Tools component, developped by Peter himself, that seem to be my best option for doing this. However i'm running into a weird issue as the output have tracks sorted in a weird order. The order seems to be 10-01-11-02-12-03 ...  :o
To make things even weirder (is it a word?), the issue isn't present on multi-disc albums.

I'm using a nice script from the linked thread in the header section to organize the output
Code: [Select]
$ifgreater(%totaldiscs%,1,$ifgreater(%discnumber%,1,,$crlf()%album artist% - %album% - %date% '('%codec%[ %codec_profile%$ifequal($strcmp(%codec_profile%,CBR),1, %bitrate% kbps,)]')'$crlf()),$crlf()%album artist% - %album% - %date% '('%codec%[ %codec_profile%$ifequal($strcmp(%codec_profile%,CBR),1, %bitrate% kbps,)]')'$crlf())$ifgreater(%totaldiscs%,1,$crlf()disc %discnumber%,)
The track pattern however is very simple. I also tested the output of a single album without header grouping and only that track pattern and i have the same issue.
Code: [Select]
%track% . %title% - %length%

And here is an example of the output. You can see that the first disc, which is a multi-disc is sorted correctly but the second isn't.
Quote
Avantasia - Ghostlights - 2016 (FLAC)

disc 1
01 . Mystery of a Blood Red Rose - 3:52
02 . Let the Storm Descend Upon You - 12:10
03 . The Haunting - 4:42
04 . Seduction of Decay - 7:18
05 . Ghostlights - 5:46
06 . Draconian Love - 4:59
07 . Master of the Pendulum - 5:05
08 . Isle of Evermore - 4:29
09 . Babylon Vampyres - 7:14
10 . Lucifer - 3:51
11 . Unchain the Light - 5:06
12 . A Restless Heart and Obsidian Skies - 5:55
13 . Wake Up to the Moon - 4:44

disc 2
01 . Spectres - 6:04
02 . Invoke the Machine - 5:36
03 . The Story Ain't Over - 4:45
04 . Prelude - 1:25
05 . Reach Out for the Light - 8:05
06 . Avantasia - 5:17
07 . What's Left of Me - 5:56
08 . Dying for an Angel - 4:59
09 . Twisted Mind - 6:29
10 . The Watchmakers' Dream - 4:47
11 . Another Angel Down - 5:31

Avantasia - Moonglow - 2019 (FLAC)

10 . Requiem for a Dream - 6:09
01 . Ghost in the Moon - 9:52
11 . Maniac - 4:32
02 . Book of Shallows - 5:01
12 . Heart - 3:49
03 . Moonglow - 3:57
04 . The Raven Child - 11:15
05 . Starlight - 3:39
06 . Invincible - 3:08
07 . Alchemy - 7:29
08 . The Piper at the Gates of Dawn - 7:21
09 . Lavender - 4:31
Any idea what goes wrong?

 

Re: Tracks not sorted correctly by textools

Reply #1
I use text tools all the time and to my knowledge that component doesn't do any sorting at all. It just takes over whatever sort pattern you use on the given source, most likely some playlist viewer. I don't think you should be troubleshooting text tools itself but rather take a look at the sort pattern you use in your playlist viewer or whatever you use to call up your files.
Also, the group header doesn't do any organizing, it's just gives you a header, nothing more. Adding or removing the header script wouldn't make much difference other than having no header.

Re: Tracks not sorted correctly by textools

Reply #2
So i did look at my source (I'm using SMP library view tree) and it was set to "folder structure". Setting it to another view solved the issue but the order was actually correct in the source, and different from Text Tools output as you can see in this screenshot.

So, i know how to get it working, but not why it wasn't working before. Looks like there's still something strange but well, as long as it works. Thanks.