INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: suggestion: group by album with empty artist  (Read 4494 times)

rjm

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2699
suggestion: group by album with empty artist
« on: September 01, 2011, 09:59:44 pm »

Group by Album is a great feature. A small tweak would make it better.

Most albums have an Artist so the group header "Album by Artist" makes sense.

There are cases however when Artist is intentionally left empty. For example, multi-part movies in my library where I leave Artist empty, set Album to the movie title, and set Name to Part 1, Part 2 etc. In this case the group header "Title by Unknown Artist" is kind of ugly.

Could we please make the group header say "Album" (rather than "Album by Unknown Artist") when Artist is empty?
Logged

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: suggestion: group by album with empty artist
« Reply #1 on: September 01, 2011, 11:14:56 pm »

Quote
Group by Album is a great feature.

The feature is "Group by," not "Group by Album." The grouping can be by any field, including an expression field that includes information conditionally, and formats the result as desired.
Logged

rjm

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2699
Re: suggestion: group by album with empty artist
« Reply #2 on: September 02, 2011, 01:15:29 am »

Thanks, was aware we can group by any field however have not done any testing to see if "... by Artist" header is applied to any groups other than Album.

Are you saying that I can change the header by using an expression field?
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8973
Re: suggestion: group by album with empty artist
« Reply #3 on: September 02, 2011, 01:21:46 am »

You can. You can also try the "Album by date" option, which just displays album name, and sorts the albums by date, newest first, or you could also try using a-z>album or z-a>album. All three choices just use the album name in the group header.

EDIT:
If you made a library field using calculated data, using the following expression: if(isempty([artist]),[album],[album] by [artist])
and set to group by this field, I'm sure you can see what would happen. Problem there though, is that you're limited to sorting alphabetically, one way or the other. The only way to get the groups to sort by date is to add the field to the data... clean(if(isempty([artist]),[date (year)] - [album],[date (year)] - [album] by [album artist (auto)]))

rjm

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2699
Re: suggestion: group by album with empty artist
« Reply #4 on: September 02, 2011, 03:02:17 am »

Thanks kindly.

I had this figured out a few years ago but have not touched it since and am rusty.

I selected group by album and the "by Artist" in the header is now gone as I wanted. But now I am confused.  I can't for the life of me figure out how to put it back. I seem to recall a group setting called Album by Artist but no longer see it.

How do I get back to the header "Album by Artist". I do want this in some of my views.
Logged

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: suggestion: group by album with empty artist
« Reply #5 on: September 02, 2011, 03:12:36 am »

Problem there though, is that you're limited to sorting alphabetically, one way or the other.

True, but I do something like you suggest. That works for me because I want the albums to be sorted by year and for the year to appear in the heading.

Video, however, is a little more challenging. I want my main Video view to handle all types of video, without me having to constantly adjust it to suit the contents. My solution is to group by an expression field that groups movies into several different types, uses [Series] for series, and other stuff is all "Sundry." I use another expression field as a sort key that sorts Episodes by [Episode] and everything else by [Name]. The view is a Panes view, the first pane of which is an expression that creates a simple nested list of video types.

Regardless of the values I select from that pane, the file list will group videos that are not series by (English|Foreign|Trailers|Sundry) while simultaneously grouping any episodes by [Series], and the contents of all groups are appropriately sorted. It sounds complicated, but the result is I can select whatever video types I want from the pane, and the results are automatically displayed appropriately. I find it much more practical than maintaining multiple views.
Logged

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: suggestion: group by album with empty artist
« Reply #6 on: September 02, 2011, 03:16:31 am »

How do I get back to the header "Album by Artist". I do want this in some of my views.

Just select Group by... Album again. That's the "Album by Artist" default.
Logged

rjm

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2699
Re: suggestion: group by album with empty artist
« Reply #7 on: September 02, 2011, 11:10:41 am »

Selecting group by Album results in header "Album". Repeating the selection results in no change.

I seem to recall a setting something like "Album (by Artist)" but don't see it. I also recall that this setting would be available in some views but not in others. I think I got around this by finding one view with Album (by Artist) then saving it and restoring it into other views that needed it.

Can anyone shed any light on a better way to set the header to Album by Artist?
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: suggestion: group by album with empty artist
« Reply #8 on: September 02, 2011, 11:18:28 am »

If the "Album" under Group By > More (sort groups a-z) is selected, then you get only the Album field.

If the "Album" under Group By is selected (2nd menu item), this uses the built-in Album by Artist followed by a right-justified Date in the Group By header.

Can you try and confirm both of these?
Logged
The opinions I express represent my own folly.

rjm

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2699
Re: suggestion: group by album with empty artist
« Reply #9 on: September 02, 2011, 12:05:11 pm »

Not consistent.

I have one view where both methods of grouping by Album result in header of Album only.

I have another view that behaves as you suggest.

To repeat, this is consistent with my observation years ago that there is some magic going on. I recall when I finally got one the way I wanted it I saved it for future cloning so I could always get it when needed.
Logged

rjm

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2699
Re: suggestion: group by album with empty artist
« Reply #10 on: September 02, 2011, 12:31:09 pm »

More magic. Some views have a Group By More "Artist - Album (Year)" option and others do not.
Logged

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: suggestion: group by album with empty artist
« Reply #11 on: September 02, 2011, 03:59:29 pm »

I saved it for future cloning so I could always get it when needed.

What do you mean by this? I don't see any way of saving a grouping preset. Those provided appear to be hard-coded. If one of those is not what's needed, then there's the "More" lists. I don't see anything in those lists that's not a field...

More magic. Some views have a Group By More "Artist - Album (Year)" option and others do not.

...including [Artist - Album (Year)]—a stock expression field. The lists appear to be filtered according to the media types included in the view.
Logged

rjm

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2699
Re: suggestion: group by album with empty artist
« Reply #12 on: September 02, 2011, 09:17:05 pm »

I mean, when I got Album by Artist (with Year on right) working I saved the view. Then whenever I needed this grouping in another view I loaded the saved view as a starting point before customizing other aspects of the view. I did this for many views because I like the grouping.

All views discussed in this thread are 99% video. I will check media types in more detail to see if I can get any insights.
Logged

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: suggestion: group by album with empty artist
« Reply #13 on: September 03, 2011, 01:18:58 am »

Group by...Album means different things depending on the media type included in the view. If any audio files are included in the view, then "Album" means [Artist]/[Album] and the header is "[Album] by [Artist]...[Year]." Otherwise, "Album" means [Album] and the header is "[Album]." Perhaps confusion could be avoided by changing the menu caption to "Artist/Album" when that's what it does.

The behaviour of "Group by Album" in a video view can therefore be changed simply by including at least one audio file in the view. I suspect this is what your saved view is doing. Do it's Rules for file display include [Media type]=[Audio]? I'm not suggesting this is what should be done. On the contrary, given it's special meaning/treatment in the program, I wouldn't use [Album] for anything but it's intended purpose.

For a general video view, [Series] can be used for grouping. It's already necessary for grouping episodes, and can also be used to group movie "series" (e.g., Lord of the Rings). [Name] can be modified so the members of a series appear in desired order, or [Episode] can be used to do so. Or [Season] so [Episode] is available for numbering multi-part movies. In other words, Group by [Series], Sort inside groups by an expression field = [Season] [Episode].
Logged

rjm

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2699
Re: suggestion: group by album with empty artist
« Reply #14 on: September 03, 2011, 09:53:12 am »

Thanks. Media type influencing grouping choices seems like a plausible explanation. I will confirm.

I don't use the Series or Episode fields. I have designed my library to be consistent across all media types. So, for example, when I filter on the artist equals Richard Dawkins I see eBooks, audiobooks, documentaries, blogs, podcasts, and courses all with the title in Album.

I wish MC would not make decisions for me based on media type. It's so archaic. We live in a multi-media world. Audiobooks and music have text descriptions and image artwork. Movies have text descriptions. Music and podcasts are sometimes video. etc. etc.
Logged

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: suggestion: group by album with empty artist
« Reply #15 on: September 03, 2011, 01:23:26 pm »

Quote
I don't use the Series or Episode fields. I have designed my library to be consistent across all media types.

This was intended to be an illustration of the fact we're not constrained in how to organize our data. I might have made the point using only custom fields, but—unlike [Album]—I couldn't think of any reason not to use these fields for a broader purpose.

Quote
I wish MC would not make decisions for me based on media type.

So why let it do so? You've chosen to use [Album] in an unconventional manner where it has the same meaning across media types. Fine. But it follows you should be ignoring the design elements based on the conventional view that "Album" has a somewhat different meaning depending on media type. Don't use a preset/default grouping scheme that changes based on media type. The special heading format you happen to like wouldn't exist if it weren't for the design assumption you've chosen to reject. You're free to create your own grouping schemes. You can create a view that includes all media types (and uses [Media type] as just one of many Categories), uses [Album] consistently throughout, and uses expression fields for grouping and sorting to adapt to any real inconsistencies in the data.
Logged

rjm

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2699
Re: suggestion: group by album with empty artist
« Reply #16 on: September 03, 2011, 02:16:42 pm »

Guess I need to figure out how to create custom versions of groupings that already exist for some media types. Will work on this when I get some free time.
Logged

rjm

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2699
Re: suggestion: group by album with empty artist
« Reply #17 on: September 04, 2011, 12:16:49 am »

I should talk less and ask/listen more.

I think I am starting to get this expression field/grouping thing. This area has until now been a frustrating black hole for me.

I may be back with a few implementation questions but at least I now get the concept.

Thanks everyone for your help.
Logged

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: suggestion: group by album with empty artist
« Reply #18 on: September 04, 2011, 01:10:56 am »

Excellent! But I hope you didn't get the impression there's any escape from the black hole. :o

Here's the grouping expression for my "All Video" view (line breaks added for readability)...

Code: [Select]
If(IsEmpty([Episode.]),
If(IsEqual([Filename (path)], Trailers, 8), / Trailers,
If(IsEqual([Filename (path)], Classics, 8), If(IsEqual([Language], English), / English, / Foreign),
If(IsEqual([Filename (path)], Movies, 8), If(IsEqual([Language], English), / English, / Foreign),
If(IsEqual([Filename (path)], Viewed, 8), If(IsEqual([Language], English), / English, / Foreign),
/ Sundry)))),
If(IsEqual(Right([Series],1),/)), RemoveRight([Series],7), [Series])
/(Right([s.Started],4) - If(IsEmpty([s.Ended]), continuing, Right([s.Ended],4))/)
Mid(★★★★★,0,[s.Rating]))

...and the sort key is: If(IsEmpty([Episode.]), [Name], [Episode.])

Now I'm looking forward to seeing the equivalent for your "All Media" view. But don't think you're alone (in the dark). MrC is going to explain how to replace my expression with a more elegant regex version. ;D
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: suggestion: group by album with empty artist
« Reply #19 on: September 04, 2011, 11:11:00 am »

Here's a teaser.  Replace

Code: [Select]
If(IsEqual([Filename (path)], Classics, 8), If(IsEqual([Language], English), / English, / Foreign),
If(IsEqual([Filename (path)], Movies,  8),  If(IsEqual([Language], English), / English, / Foreign),
If(IsEqual([Filename (path)], Viewed,  8), If(IsEqual([Language], English), / English, / Foreign),

with

Code: [Select]
If(Regex([Filename (path)], /#\b(Classics|Movies|Viewed)\b#/),
    If(Regex([Language], /#^(English)$#/), / [R1], / Foreign),

What are the possible values for Series, s.Started and s.Ended?
Logged
The opinions I express represent my own folly.

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: suggestion: group by album with empty artist
« Reply #20 on: September 04, 2011, 02:22:50 pm »

Quote
Here's a teaser.

I thought I was teasing you! ;)

Yes, I realized when I was doing it that I should be using regex—especially if there were more folders involved.

Quote
What are the possible values for Series, s.Started and s.Ended?

My expression addresses the rare situation where [Series] is of the form 'Series (Year)'. (This is done only for the sake of Sick Beard, which requires this if the title is not otherwise unique). I remove '(Year)' so the grouping caption is not, for example, 'Louie (2010) (2010 - continuing) ★★★'.

[s.Started] and [s.Ended] are date-type fields, so their data appears as mm/dd/yyyy. But is that what Regex() sees? If so, is that form determined by the system's Regional Settings?
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: suggestion: group by album with empty artist
« Reply #21 on: September 05, 2011, 11:26:08 am »

For this portion:

Code: [Select]
   If(IsEqual(Right([Series],1),/)), RemoveRight([Series],7), [Series])

I would prefer:

Code: [Select]
   Regex([Series], /#^(.+)(?: [(]\d{4}[)])?$#/, 1)

Which just pulls everything from series but a possible trailing " (year)" sub-string.

I assume Regex() sees whatever raw string it was passed - any date conversion or output formatting would have occurred by other functions.
Logged
The opinions I express represent my own folly.

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: suggestion: group by album with empty artist
« Reply #22 on: September 05, 2011, 02:37:46 pm »

Code: [Select]
Regex([Series], /#^(.+)(?: [(]\d{4}[)])?$#/, 1)Which just pulls everything from series but a possible trailing " (year)" sub-string.

This might be a good example of why regex can be so frustrating. Your expression makes perfect sense, but it doesn't work. It still captures the trailing ' (Year)'. It seems the first capture needs to be non-greedy (i.e., '(.+?)'), but I don't understand why that should be necessary. :-\
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: suggestion: group by album with empty artist
« Reply #23 on: September 05, 2011, 08:39:29 pm »

I should have tested it.  That's correct, since the year capture segment is optional, greedy would prevail:

Regex([Series], /#^(.+?)(?: [(]\d{4}[)])?$#/, 1)
Logged
The opinions I express represent my own folly.

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: suggestion: group by album with empty artist
« Reply #24 on: September 05, 2011, 10:43:01 pm »

Quote
I should have tested it.  That's correct, since the year capture segment is optional, greedy would prevail:

Perhaps just as well you didn't. I only learn nuances like this by banging my head against the wall. ;)

So now my grouping expression is...

Code: [Select]
If(IsEmpty([Episode.]),
If(IsEqual([Filename (path)], Trailers, 8), / Trailers,
If(Regex([Filename (path)], /#\b(Classics|Movies|Viewed)\b#/),
If(Regex([Language], /#^(English)$#/), / [R1], / Foreign),
/ Sundry)),
If(IsEqual([Series.movie], pending), .Pending,
Regex([Series], /#^(.+?)(?: [(]\d{4}[)])?$#/, 1)
/(Right([s.Started],4) - If(IsEmpty([s.Ended]), continuing, Right([s.Ended],4))/)
Mid(★★★★★,0,[s.Rating])))

...which illustrates some useful regex techniques/capabilities—thanks.

But I hope we didn't lose rjm to the black hole! ;D
Logged

Daydream

  • Citizen of the Universe
  • *****
  • Posts: 770
Re: suggestion: group by album with empty artist
« Reply #25 on: September 06, 2011, 12:45:56 am »

You're doing this with the sole purpose to benchmark MC, right?  ;D
Logged
Pages: [1]   Go Up