Skip to main content
Topic: Sort Album List filter by latest %added% date first (Read 270 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Sort Album List filter by latest %added% date first

Want to sort my %added% tab by the latest entries first to oldest entries. Have the current sort function as:
Code: [Select]
$left(%added%,10)

Re: Sort Album List filter by latest %added% date first

Reply #1
Bump?

Re: Sort Album List filter by latest %added% date first

Reply #2
Hey there,

A little more information please. What are you using in the "Added" tab? It does not look like DUI / Album List...

In any case, to do what you want with a tree-based library viewer, you would prefer one with a $nodisplay function. This is because to sort the list by descending, you need to subtract the dates to become "negative", but of course you would not really want them displayed that way. So for example -

Code: [Select]
$nodisplay{$sub(9999,$year(%added%))-$sub(99,$month(%added%))-$sub(99,$day_of_month(%added%))}$date(%added%)

You can use this function with Library Tree (script) for Spider Monkey Panel on either DUI / CUI. Once you have imported the script, you should make a new view pattern for "Added"- right-click the panel > Settings > Panel Properties > see the list of numbered views ("View 07") and add a complete pattern next to it, for example -

Code: [Select]
View by Added // $nodisplay{$sub(9999,$year(%added%))-$sub(99,$month(%added%))-$sub(99,$day_of_month(%added%))}$date(%added%)|[%album artist% - ]%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%

Then switch to it with right-click panel > Settings > 'View by Added'.

(I'm not familiar with the CUI tree components to know if they have a $nodisplay or not? No doubt someone else here will know. It may look very similar to the above!)

(Incidentally, I did see an older post using unicode characters to trick Album List into descending order, but it did not seem to work right, so going with the above advice...)

Cheers

Re: Sort Album List filter by latest %added% date first

Reply #3
Code: [Select]
$nodisplay{$sub(9999,$year(%added%))-$sub(99,$month(%added%))-$sub(99,$day_of_month(%added%))}$date(%added%)
Unfortunately your string isn't quite displaying right but it's close. I am using Columns UI and Album list from this site:
https://yuo.be/album-list-panel

I don't think the component supports $nodisplay as no text is rendered after it. Removing $nodisplay shows some promise. I'll keep tinkering with it using your code to maybe get to where I want to be. Thanks!

 
SimplePortal 1.0.0 RC1 © 2008-2020