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: Reverse Sorting String (Read 2997 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Reverse Sorting String

Now this may be an incedibly stupid question, just wondering how I could get my playlist sorted in reverse order, e.g. from Z to A rather than from A to Z when I'm sorting by artist name. Tried -%Rating%, Reverse %Rating% but nothing seems to work. I don't really want to use the Reverse command every time I try to get my playlist sorted. Is this possible at all?

Reverse Sorting String

Reply #1
Quote
Now this may be an incedibly stupid question, just wondering how I could get my playlist sorted in reverse order, e.g. from Z to A rather than from A to Z when I'm sorting by artist name. Tried -%Rating%, Reverse %Rating% but nothing seems to work. I don't really want to use the Reverse command every time I try to get my playlist sorted. Is this possible at all?
[a href="index.php?act=findpost&pid=283869"][{POST_SNAPBACK}][/a]

If it's with numbers, yes.  Just subtract the value from the maximum number for that field.  For instance:
Code: [Select]
$sub(5,%rating%)

will sort reverse by rating.

Reverse Sorting String

Reply #2
Quote
Quote
Now this may be an incedibly stupid question, just wondering how I could get my playlist sorted in reverse order, e.g. from Z to A rather than from A to Z when I'm sorting by artist name. Tried -%Rating%, Reverse %Rating% but nothing seems to work. I don't really want to use the Reverse command every time I try to get my playlist sorted. Is this possible at all?
[a href="index.php?act=findpost&pid=283869"][{POST_SNAPBACK}][/a]

If it's with numbers, yes.  Just subtract the value from the maximum number for that field.  For instance:
Code: [Select]
$sub(5,%rating%)

will sort reverse by rating.
[a href="index.php?act=findpost&pid=283870"][{POST_SNAPBACK}][/a]


Wow! This did the trick. Thank you so much for your fast reply.

Reverse Sorting String

Reply #3
Using this sort string:

$if2(%album artist%,%artist%)
$if2(%album artist%,%date%)
$if2(%venue%,%album%)
%__codec%
$sub(10,%rating%)
%disc%

That works so long as all tracks in an album has the %rating% tag. If they dont, the listing will be wrong, like 10,9,tracks with missing tag,8,7,6,5,4,3,2,1.
Btw i use 1-10 rating, and only display 1-10 instead of all those dots etc, that shouldnt matter though.

Any ideas topdownjimmy?

Reverse Sorting String

Reply #4
A cop-out solution is: Sort your playlist first so that the tracks are in the "forwards" order (the one that you want to invert). Then resort your playlist with something like

$num($sub(999999999,%_playlist_number%),9)

Haven't tested this but something like the above should do it. Sorry it's a two-step solution.

Reverse Sorting String

Reply #5
@Zoominee: I have a "Playlist->Sort->Reverse" option, which should be much cleaner than the method you suggested.

Reverse Sorting String

Reply #6
@gfngfgf: Cool, i probably have that option too then! Never occurred to me because i've never thought about reverse sorting playlists until i saw this thread...