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: Album list to show compilations only (Read 6557 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Album list to show compilations only

Is it possible to have the album list to show compilations only?

I want the album list to have 2 tabs at the top - one for browsing via "album artist" (which I have set up) and one for browsing all compilations (i.e. where "album artist"="various artists").

Is this possible? Or is there a better way of doing this? Will having 2 instances of the album list in separate tabs cause undue processor load?

Thanks!

Album list to show compilations only

Reply #1
Is it possible to have the album list to show compilations only?

Yes, quite easily.
Code: [Select]
$if($stricmp(%album artist%,various artists),Compilation,Non-Compilations)|
...so on and so forth


Will having 2 instances of the album list in separate tabs cause undue processor load?

Thanks!
Maybe, but that shouldn't be necessary. The album list lets you switch between different views at the bottom of its window/pane.
elevatorladylevitateme

Album list to show compilations only

Reply #2
Thanks, but changing the album list view seems to cause a significant lag before it refreshes. Maybe because my music library is around 2TB of FLAC?

I would like to have the tab display only compilations, organised by letter; e.g. -

A
- A Brief History of Ambient (date)
- Acid Flash vol.4 (date)
  - Track no. Track title
B
etc

What would be the code required for this? Many thanks

Album list to show compilations only

Reply #3
use $left(%album%,1) to get the first letter.

Album list to show compilations only

Reply #4
Thanks all! I'm getting there! 3 questions:

1. How do I remove the "non compilations" from the above code? I just want it to show compilations, not non-compilations. If I just remove this bit then the code no longer works.

2. Plus, if possible, I don't want the list like this:

All Music
- Compilations
      - A
      - B
      - etc

But like this:

Compilations
- A
- B
- etc

3. How can I group all non-letter artists (e.g. 13th floor elevators, 2 unlimited [lol]) under "#" ?

A string of code would be much appreciated!

Thanks!

Album list to show compilations only

Reply #5
No help with this? Guess it's getting too near Christmas!

Album list to show compilations only

Reply #6
A good word to Santa for anyone able to help

Album list to show compilations only

Reply #7
1. How do I remove the "non compilations" from the above code? I just want it to show compilations, not non-compilations. If I just remove this bit then the code no longer works.

Use a filter, or something like
Code: [Select]
$if($strstr(%album artist%,Various),Compilations,)


2. Plus, if possible, I don't want the list like this:

You cannot remove the top node.

3. How can I group all non-letter artists (e.g. 13th floor elevators, 2 unlimited [lol]) under "#" ?

I use
Code: [Select]
$ifgreater($left(%album artist%,1),0,'#')

which may or may not fail for artists starting with '0', but I don't have any.
It's only audiophile if it's inconvenient.

Album list to show compilations only

Reply #8
You cannot remove the top node.

What about the 'show root node' checkbox in album list panel preferences (on the advanced tab)?

Album list to show compilations only

Reply #9
Thanks for the replies!

My code :

$ifgreater($left(%album artist%,1),0,'#') |
$if($strstr(%album artist%,Various),Compilations,) |
$left(%album%,1) |%album% '('%date%')' |
%tracknumber%. %track artist% - %title%'  '['('%rating_stars%')']

Gives the error message "INVALID $IFGREATER SYNTAX"

If I remove the $ifgreater code, I still get two main tree nodes, "compilations" and another one; see pic:



I want to have only the node "compilations" - i.e. in the pic, remove the untitled node above it.

I could not find any option to "show root node" - did you mean under album list panel preferences or under the advanced section? There is no advanced tab in the album list panel preferences bit in the latest version of Foobar.

Thanks!

Album list to show compilations only

Reply #10
My code :

$ifgreater($left(%album artist%,1),0,'#') |
[…]
Gives the error message "INVALID $IFGREATER SYNTAX"

$ifgreater requires two arguments, for if x is or is not greater than y respectively. This is documented in the title formatting reference.

Can’t you just using something like this?

$if($strstr(%album artist%,Various),Compilations,$ifgreater(10,$left(%album artist%,1),'#',$left(%album artist%,1))) |
$left(%album%,1) |%album% '('%date%')' |
%tracknumber%. %track artist% - %title%' '['('%rating_stars%')']


I tried changing your $ifgreater, because comparing the leftmost character to 0 will omit any artists beginning with 0 from your numerical group, which obviously won’t do.

Album list to show compilations only

Reply #11
I think this should do it:
Code: [Select]
$if($stricmp(%album artist%,VA),
$if($or($greater($left(%album%,1),0),$stricmp($left(%album%,1),0)),#,)|
$left(%album%,1)|
%album% ['('%date%')']|
[%tracknumber%. ]%track artist% - %title%' '['('%rating_stars%')']
,)

It can handle albums starting with zero and/or can be expanded with other characters using the $or() function.

As for the root node, I have it on the album list preferences page which has two tabs, general and advanced as you can see on the picture. I probably use an outdated version of foobar.

http://dl.dropbox.com/u/3164833/RANDOM/VA.png

Album list to show compilations only

Reply #12
Thanks -

db1989: your code gives this:



but I want to group all the symbols and numbers together under "#", and I don't want the node above compilations ("# 40" in the pic).

Daeron: your code gives this:



- no node tree at all!

Thanks for the help so far!

Album list to show compilations only

Reply #13
I guess I forgot to point out that I simply use 'VA' as album artist instead of 'Various', so you might want to change the code first according to your tags.

Album list to show compilations only

Reply #14
Code: [Select]
$if($strstr(%album artist%,Various),
$puts(chr1,$upper($left(%album%,1)))
$if($strcmp($get(chr1),$lower($get(chr1))),$puts(chr1,'#'))
$get(chr1)|%album% ['('%date%')']|[%tracknumber%. ]%track artist% - %title%' '['('%rating_stars%')']
)
HTH.

Alessandro

Album list to show compilations only

Reply #15
Thanks all! The code above does what I want (when I change "Various" to "Various Artists")!

Muchos appreciated!! 

Album list to show compilations only

Reply #16
Code: [Select]
$puts(chr1,$upper($left(%album%,1)))
$if($strcmp($get(chr1),$lower($get(chr1))),$puts(chr1,'#'))
Ah… comparing the character in lower- and upper-case to ascertain whether it’s a letter or a symbol (the latter having the benefit of not being limited to numbers)—this is pretty clever!

Out of interest, would my suggestion of $ifgreater(10,$left(%album artist%,1),'#',$left(%album artist%,1))) ever have worked?

extracampine, you can tell that my title-formatting skills are rusty!

Album list to show compilations only

Reply #17
this is pretty clever!
  I'm flattered. I wonder if it works equally well with chinese or other "exotic" characters, though.
would my suggestion of $ifgreater(10,$left(%album artist%,1),'#',$left(%album artist%,1))) ever have worked?
I'm not an expert, but I doubt it: 10 will always be > than a single character (be it '0', 'Z', etc.).

Cheers.

Alessandro

 

Album list to show compilations only

Reply #18
Ah, maybe you’re right. I did think originally that it was a bit strange to ask foobar2000 to include letters in a numerical calculation, so your method is more elegant either way.