Display Single/Multiple Artists Expression

From wiki.jriver.com
Revision as of 19:06, 30 January 2007 by Dcwebman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

What this does is create a column in a view scheme which gives you an artist if the track(s) are on a single-artist album, and gives you an album if the track(s) are on a compilation. It can really cut down the number of entries in a column, depending on the number of compilations you have. In my case by almost 1000!

If you invert the [artist]/[album] fields, it will do the opposite. I find them a great replacement for standard Artist and Album columns.

Anyway, first off, here's an image:

Artistalbum.jpg

You can see a compilation title and an artist title highlighted, and in the third column you get the artists on the compilation and the albums by the artist in the previous column.

I know you can set up view schemes with Album Type to filter your compilations out etc, but I find it helpful because I use a lot of View Schemes with 7 or 8 View Items, so trimming them down is always good. It also trims the number of entries in the second column by around half for me (from 2100 artists to 1050 artist/album entries), which is great when I'm going through the whole collection...

Step by step instructions:

1. In Edit View Scheme, Add new View Item>Advanced Expression 2. Name it Artist/Album and paste the following into the Expression field:

If(IsEmpty([artist]), none,If(IsEqual([album type],Single artist /(complete/)),[artist],If(IsEqual([album type],Single artist /(incomplete/)),[artist],If(IsEqual([album type],Multiple artists /(complete/)),[album],If(IsEqual([album type],Multiple artists /(incomplete/)),[album],[artist])

Note; if you copy and paste from this page you'll probably get line-breaks, which is no good for the Expression Evaluator, so paste it into Notepad and get rid of any line-breaks 3. Hit OK 4. Repeat steps 1 to 3, but paste the following instead:

If(IsEmpty([album]), none, If(IsEqual([album type],Multiple artists /(complete/)),[artist],  If(IsEqual([album type],Multiple artists /(incomplete/)),[artist],  If(IsEqual([album type],Single artist /(complete/)),[album],  If(IsEqual([album type],Single artist /(incomplete/)),[album],[artist])

I have found a vastly less text-intensive version of these expressions:

Artist/Album

If(IsEmpty([artist]), none, If(IsEqual(Mid([album type]), S), [artist], [album])

Album/Artist

If(IsEmpty([album]), none, If(IsEqual(Mid([album type]), M), [artist], [album])


I don't know if anyone found them useful, but here are 2 more that are helpful with the 2 above:

AR/AL Rating

You have to create the Artist Rating and Album Rating fields for this to work

If(IsEmpty([artist rating]), !,  If(IsEmpty([album rating]), !,  If(IsEqual(Mid([album type]), S), [artist rating], [album rating])

Initial

Returns first letter of album or artist (after 'the' or 'a')

If(IsEmpty([artist]), none, If(IsEqual(Mid([album type]), S), If(IsEqual(Mid([Artist],0,4),The ), Mid([artist],4), If(IsEqual(Mid([Artist],0,2),A ), Mid([artist],2), Mid([artist]))), If(IsEqual(Mid([Album],0,4),The ),    Mid([Album],4), If(IsEqual(Mid([Album],0,2),A ), Mid([Album],2), Mid([Album])))))   


Thanks EpF.