Date sort order fallback

Feature description:

It would be great to have some kind of fallback behavior when sorting albums by date.
For instance, ideally, I’d like to sort albums by original release date.
But lots of my albums don’t necessarily have this date tagged.
So, ideally, I’d like them to be sorted by:

  1. Original release date
  2. If none, release date
  3. If none, year

Problem solved:

If I sort by original release date (desc), I currently have at the bottom of the list all the albums without original release date, sorted alphabetically (desc). And after that, all the albums with original release date, correctly sorted.
(See screenshot)

Brought benefits:

Sorting consistency

Other application solutions:

 

 

Additional description and context:

 
In my screenshot, all the albums before Xenosaga III do have original release date, so they’re correctly sorted.

All the ones from Xenosaga III to Achilles only have year tagged, so they’re alphabetically sorted, which is kind of weird to see 2 different sorting behaviors.
 

Screenshots / Mockup:

 

   

Unfortunately this is not really possible due to how sorting works at query level.

I can sort by field 1 then field 2 then field 3 or of course I can cheat and sort by field 1 + field 2 + field 3 to workaround and get closer to your need.

But then the sorting is still wrong since the sorting is impacted by all fields, and duplicated original release date will be sorted by release date or year or both and would be hard to guess why it’s sorted like that.

In Navidrome, it’s sorted first by original release date, if none by release date, if none by year (I think it’s considered like the first day of the year). Only one of those values is used per album for sorting. Isn’t it possible to use a similar behavior?

That’s not what it does at all.

coalesce(nullif(original_date,''), cast(max_year as text)), release_date

It use orig data if not null else year then release date but as a secondary.

Ok. Eventually, it’s coherently sorted imho. Sorting albums this way in Symfonium would be great

Well that’s very different from your suggestion, but yes since the year is often extracted from original date then release date then a raw year tag it’s something that makes sense and will change.

OK nice, that would be great, thanks a lot :+1:t3:
My suggestion was probably off, but actually my need was to get the same sorting as the one in Navidrome.
Anyway, thanks for your swift reply :+1:t3: