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 view for single genre? (Read 536 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Album list view for single genre?

If it is possible to do, what would be the syntax to have  an album list view set to show a single genre?

I normally browse by artist-->albums with this:

$if($stricmp($substr(%album artist%,1,4),'The '),$stripprefix(%album artist%)', The',%album artist%)|%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%

I would like to basically replicate this view, just limiting it to a single, given genre (in my case the genre would be 5.1).

I have tried reading the wiki but found few examples of this conditionals use... plus I'm dumb, quite likely. ;D

Re: Album list view for single genre?

Reply #1
Hi there,

I'm not sure you need that first $if - you could use $swapprefix to put 'The' at the end, if that is what you were trying to get.

To show a single genre, wrap the entire view pattern in an $if test for that genre - $strstr will test for partial match (so multi-value genre tags get included), or $strcmp for exact match (single value tag) -

Code: [Select]
$if($strstr(%genre%,5.1),$swapprefix(%album artist%,The)|%album%|[[%discnumber%.]%tracknumber%. ][%track artist% - ]%title%)

(I'm not on PC to test this but it should work)