Posts: 26
Threads: 7
Joined: Apr 2018
Reputation:
8
05-09-2018, 12:31 PM
(This post was last modified: 05-09-2018, 12:32 PM by deztiny.)
Hello Tim,
long time ago in moOde 3.x i already asked for this, think its time to bring it up in this nice new forum again
In library view currently the albums are currently sorted by name alphabetically.
I (and certainly not only me) have a lot of discographies of an artist. And I am very used to display albums by year and not by name alphabetically.
Would be great if you could add an option to configuration to switch album sorting.
If you don't like the idea or it is low prio for you I would be very thankful if you could tell me the file and line where i could change this manually (permanently).
Thank you
Mario
Posts: 13,442
Threads: 305
Joined: Mar 2018
Reputation:
545
05-09-2018, 02:32 PM
(This post was last modified: 05-09-2018, 04:51 PM by Tim Curtis.
Edit Reason: spelling
)
Hi,
MPD supports the Date tag which represents a song's release date. Generally this can be used to represent an Albums release date except for Compilation albums which usually contain songs that have different release dates.
https://www.musicpd.org/doc/user/tags.html
There is a tag called AlbumSort that could be used to specify the Album release date but I've never seen it present in any of my song files.
If you want to examine the code that generates the Library then start with /var/www/inc/playerlib.php and the function loadLibrary(). Then /var/www/js/playerlib.js and the function renderLibrary()
-Tim
Posts: 26
Threads: 7
Joined: Apr 2018
Reputation:
8
05-09-2018, 03:17 PM
(This post was last modified: 05-09-2018, 03:18 PM by deztiny.)
Hello Tim,
exactly, I am talking about the tag "date: the song's release date. This is usually a 4-digit year".
For me this date represents the year the CD/album was released. Of course on compilations it could be reffered to the individual release year of every single track, but I doubt that it is common to do that for an album?
Since I am trying to have a maximum of compatibility of my mp3 files (over as many players as possible, especially car radio systems) I am only using the most common tags (artist, album, title, track, name, date, composer, genre, comment), so no AlbumSort.
So is this something that you think would make sense to implement this switch for sorting according to 4digit years in date field?
Of course it would be very nice if album title is then also display including the date like "1975 - A Night at the Opera", to make clear why the sorting is not alphabetically anymore (but that would only be an addon).
Or is it only me who gets confused in an artist's discography if it is not sorted by release date?
Mario
Posts: 13,442
Threads: 305
Joined: Mar 2018
Reputation:
545
Hi Mario,
Its not been a common request but you could try modifying the code yourself.
/var/www/inc/playerlib.php
function genLibrary($flat) {
Add the date to the line of code below, then reboot, open Sources and RESET the Library cache, then open the Library.
$album = $flatData['Album'] ? $flatData['Date'] . '-' . $flatData['Album'] : 'Unknown';
-Tim
Posts: 95
Threads: 2
Joined: Apr 2018
Reputation:
2
05-09-2018, 05:39 PM
(This post was last modified: 05-09-2018, 05:44 PM by Koda59.)
(05-09-2018, 03:17 PM)deztiny Wrote: Hello Tim,
exactly, I am talking about the tag "date: the song's release date. This is usually a 4-digit year".
For me this date represents the year the CD/album was released. Of course on compilations it could be reffered to the individual release year of every single track, but I doubt that it is common to do that for an album?
Since I am trying to have a maximum of compatibility of my mp3 files (over as many players as possible, especially car radio systems) I am only using the most common tags (artist, album, title, track, name, date, composer, genre, comment), so no AlbumSort.
So is this something that you think would make sense to implement this switch for sorting according to 4digit years in date field?
Of course it would be very nice if album title is then also display including the date like "1975 - A Night at the Opera", to make clear why the sorting is not alphabetically anymore (but that would only be an addon).
Or is it only me who gets confused in an artist's discography if it is not sorted by release date?
Mario
Hi Mario,
but date on each song could be a problem for Best Of, anthology, VA or even soundtrack ... except if you retag yourself all your songs
Why not, i've done that for AlbumSort tag (which is an standard ID3) to avoid that ... and my library looks like that :
I used Mp3tag to retag in mass ... you could create your own Action for automation on directory including subdirs
-Eric
Posts: 26
Threads: 7
Joined: Apr 2018
Reputation:
8
(05-09-2018, 05:24 PM)Tim Curtis Wrote: Hi Mario,
Its not been a common request but you could try modifying the code yourself.
/var/www/inc/playerlib.php
function genLibrary($flat) {
Add the date to the line of code below, then reboot, open Sources and RESET the Library cache, then open the Library.
$album = $flatData['Album'] ? $flatData['Date'] . '-' . $flatData['Album'] : 'Unknown';
-Tim
Tim, thank you soooo much, this works great! I am in heaven using moOde now
Very tiny change to :
$album = $flatData['Album'] ? $flatData['Date'] . ' - ' . $flatData['Album'] : 'Unknown';
Of course this now look a bit strange if you have selected more than one artist, like a hole genre but i would also not want to search through a ton of albums sorted alphabetically without selecting an artist anyway.
Also at Eric: yes it will not look nice if there are tracks of an album with different year dates. But i dont have that in my whole collection - since its fully CD based with one year date for all tracks of ar CD. I guess an individual track will only occur on mp3 collections not based on CDs. Then using "AlbumSort" tag instead of "date minus album" would probably be a better idea.
And yes, mp3tag is THE tag editor, I am using it for more than 15 years now Especially mass tagging, actions, regex... are sooo cool...
Mario
Posts: 13,442
Threads: 305
Joined: Mar 2018
Reputation:
545
Nice :-)
If I get more requests for this I can add to the TODO list.
-Tim
Posts: 10
Threads: 0
Joined: Oct 2018
Reputation:
1
10-17-2018, 03:55 PM
(This post was last modified: 10-17-2018, 07:01 PM by kris_jag.)
I also would be very grateful for implementation of sorting of albums by year
Tim, deztiny - thank you for guide, my variation below:
$album = $flatData['Album'] ? '[' . $flatData['Date'] . '] ' . $flatData['Album'] : 'Unknown';
resulting with: [Year] Album
Posts: 35
Threads: 4
Joined: Jul 2018
Reputation:
0
Hi,
+1 for this kind of feature.
Maybe they could be some choice in the "customize" menu. I would also add a per disc number classification
to me order should be :
(Style/genre) —> album artist —> album publication date —> Album name —> CD number —> track number
for classical song it's more with composer first
Tx
Rasptouch case with RPI3 + I2C 16x2 screen and IR port
Audiophonics I-Sabre V2.1 DAC ES9023 TCXO
Posts: 30
Threads: 6
Joined: Nov 2018
Reputation:
0
11-23-2018, 03:28 PM
(This post was last modified: 11-23-2018, 03:29 PM by JohnM73.)
+2 for this feature
|