Sonerezh / sonerezh

A self-hosted, web-based application to stream your music, everywhere.
https://www.sonerezh.bzh
GNU Affero General Public License v3.0
767 stars 122 forks source link

Add possibility to sort album by year #377

Closed kuroidoruido closed 1 year ago

kuroidoruido commented 4 years ago

As I wrote in the PR title, this is a little piece of code to add possibility to sort albums (in artist and search view only) by year and no more by name.

By default nothing will change. The sort order will be changed only if we tick a checkbox on the settings page.

Do manage this feature I added a new setting value, stored in the database as a new column. So to use this feature it's mandatory to add the column to the table settings. It's possible to make it by hand (I can add some doc to give every user an SQL request to edit the database), or we can use Migrations plugin : https://book.cakephp.org/migrations/2.x/en/index.html#adding-columns-to-an-existing-table. Tell me what do you think is the better choise.

By the way, if the column was not added nothing will be broken. All will working as usual.

I think it fix initial request of this issue: #125.

Can you give me your opinion about this feature? :)