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: Sort album list by folder/location? (Read 1535 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Sort album list by folder/location?

I have a music folder on my laptop, and another one on an external drive. When I go to preferences>media library and add both folders, all albums from both locations are listed together under "all music". Is it possible to split the album list so it shows the C:/ and E:/ folders as separate sections?
last.fm/user/ihatepretending

Re: Sort album list by folder/location?

Reply #1
I use the Album List viewer. Try to configure a sort by the first letter of the path, and then by your otherwise preferred order?

Re: Sort album list by folder/location?

Reply #2
Sorry, I'm still a noob, could you please suggest a code line to try?

Right now my Album list looks like this: https://ibb.co/doXZ6k

But I want to organize it like this: https://ibb.co/frEgmk
last.fm/user/ihatepretending

Re: Sort album list by folder/location?

Reply #3
You can get at least nearly there. Try the following.

Go to Preferences -> Album List.
See the "Views" window and the buttons underneath? Click "Add new".
Give it a name you like, e.g., uselessladder-sortorder
In the code, enter for example the following - you do not want this, the text is to explain what happens:
Code: [Select]
$left(%path%,3) %album artist% will be expandable, click the plus to see whatever is after the pipe sign | released in [%date%] the album %album%
Then select the "uselessladder-sortorder": in your screenshots, it is just above the "Playback stopped" in the lower left corner.

Now you can customize the code. You do not want the text, but now you know what the pipe means. E.g.,
Code: [Select]
$left(%path%,3) %album artist% | %date%  %album%
will have letter with colon and slash (because of the "3") and album artist, then expand it and you get the date (question marks if no date, those are removed by putting %date% in brackets as [%date%], and album title.

If you want the literal "Laptop Music" in place of "C:\", then I think a $replace would do, but I am not sure. But at least the above will get you the C:\ before the E:\

Re: Sort album list by folder/location?

Reply #4
@uselessladder

This should work as well
Code: [Select]
$if($stricmp($left(%path%,1),F),Laptop Music,External Music)|
as in
Code: [Select]
$if($stricmp($left(%path%,1),F),Laptop Music,External Music)|%<artist>%|%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%
See screenshot.

Notes
Replace the 'F' with the relevant drive letter on the laptop
External comes before Laptop (Xternal doesn't)
You can't get rid of the 'All Music' label
You can't get rid of the item counter
You may also want to experiment with the $directory(path,n) function
As always: Consult http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Titleformat_Reference

Re: Sort album list by folder/location?

Reply #5
Thank you guys so much! This line worked perfectly for me:

Code: [Select]
$if($stricmp($left(%path%,1),C),Laptop Music,External Music)|%<artist>%|%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%

Now, what do I need to add to make it ignore articles in the list (e.g. list The Beatles under B instead of T)?
I read about using $stripprefix, but I'm not sure where to insert it to make it work.
last.fm/user/ihatepretending

Re: Sort album list by folder/location?

Reply #6
Now, what do I need to add to make it ignore articles in the list (e.g. list The Beatles under B instead of T)?

$swapprefix(%<artist>%) in place of artist, I think. That should replace "The Beatles" by "Beatles, The" and "A Perfect Circle" by "Perfect Circle, A". If you want other articles moved, use $swapprefix(%tagname%,The,Die,Der,Los,...) or something like that.
I would use $swapprefix over $stripprefix, in case you have e.g. the two different bands "Esoteric" and "The Esoteric" - however, if you have more issues with inconsistent tagging "Beatles" vs "The Beatles", you can use $stripprefix.

Myself I use an Album Artist Sort tag, so that I can make sure I have "Rainbow" and "Ritchie Blackmore's Rainbow" together, and "The Mothers of Invention" together with Zappa.

 

Re: Sort album list by folder/location?

Reply #7

Myself I use an Album Artist Sort tag, so that I can make sure I have "Rainbow" and "Ritchie Blackmore's Rainbow" together, and "The Mothers of Invention" together with Zappa.

That's an elegant solution that I haven't thought of. Thanks!
last.fm/user/ihatepretending

Re: Sort album list by folder/location?

Reply #8
MusicBrainz Picard uses ALBUMARTISTSORTORDER. Since I frequently have opinions on my own on the matter, I use a different tag, and sometimes copy / sometimes delete Picard's tag.