INTERACT FORUM

More => Old Versions => Media Center 17 => Topic started by: audunth on November 11, 2011, 10:40:09 pm

Title: Ignoring articles when sorting
Post by: audunth on November 11, 2011, 10:40:09 pm
Hi,

I don't know whether to call this a bug or not, but it's quite annoying: When I choose to ignore articles in sorting, movies starting with "The" is sorted according to the second word. So far, so good, but when I browse through several hundred movies (both in Theatre view or Standard view), I tend to press a letter on the keyboard to faster find the movie I'm looking for. Now, pressing T just get me to the next one starting with "The", so I have to hammer T many times to get to my movies starting with T. When I've specifically chose to ignore articles in sorting, it should be ignored when using a letter to jump in scrolling too, IMO.

Is it possible to change this behaviour?
Title: Re: Ignoring articles when sorting
Post by: vagskal on November 12, 2011, 05:29:28 am
I have also asked for a way to ignore articles when doing scroll by typing.

As a workaround you can remove the leading "The " with a simple expression:
Code: [Select]
Regex([Name of Your Field],/#(^The )?(.*)#/,2)
Put that expression in a custom field ([Name of Your Field_Sort]) and group by that field. The downside is that you will then not see the actual name with the leading "The ". I find that this works best in pane views where I put a similar expression in the pane and do my scroll by typing in the pane. Then the name is crippled only in the pane and I can Group by, and see, the entire correct name.
Title: Re: Ignoring articles when sorting
Post by: audunth on November 12, 2011, 05:48:47 am
I did a workaround by temporarily turning off the ignore article setting to simply get all the "The" names together in the view, then selecting them and first using =removeleft([name],4) to remove the "The" and then =[name], The to put it last. So now a name would look like this "Terminator, The". It works, it just doesn't look as good, and shouldn't be necessary. If I select to ignore the article in sorting, it means I want to ignore the article for type in letter search too.
Title: Re: Ignoring articles when sorting
Post by: vagskal on November 12, 2011, 05:58:47 am
That will alter your Name field and you will have to do it every time you add files. If you put this modified expression in a new custom field [Name_Sort] and use this field instead of [Name], MC will do it automatically for you also with new files and you will retain info on the actual name if you ever want to display that:
Code: [Select]
Regex([Name],/#(^The )?(.*)#/,-1)If(IsEmpty([R1]),[Name],[R2]/,/ The)
EDIT: The expression was not complete so I corrected it. Sorry.
Title: Re: Ignoring articles when sorting
Post by: audunth on November 12, 2011, 06:18:23 am
Thanks, I'll give that a try. I set my view then to show [Name_Sort] instead of [Name], right?
Title: Re: Ignoring articles when sorting
Post by: vagskal on November 12, 2011, 06:22:33 am
Yes.

Please observe that I amended my last post with the correct expression.

I get some performance issues when I use an expression for a field I use for scroll by typing (the first character(s) pressed are sometimes ignored). So you might want to try it out in one view before changing a lot of views.
Title: Re: Ignoring articles when sorting
Post by: rjm on November 12, 2011, 12:24:08 pm
This is a major annoyance. MC should be changed to ignore articles when doing scroll by typing.
Title: Re: Ignoring articles when sorting
Post by: vagskal on November 12, 2011, 12:39:48 pm
This is a major annoyance. MC should be changed to ignore articles when doing scroll by typing.

I agree. If performance will suffer when ignoring articles etc. on the fly when scroll by typing perhaps an option to "Ignore articles when scroll by typing" (like the current "Default search field" option) for each custom field would be a solution. Then a special table (or perhaps rather an internal field since MC is not a relation db) - like an ARTISTSORT field - could be included in the database containing the field contents without leading articles and diacritics and used when scroll by typing?
Title: Re: Ignoring articles when sorting
Post by: kensn on November 12, 2011, 01:06:38 pm
Code: [Select]
Regex([Name],/#(^The )?(.*)#/,-1)If(IsEmpty([R1]),[Name],[R2]/,/ The)

And to ignore a period before an Artist name... As in .38 Special

I changed [name] to [artist] and tried (^The|/.) but it gave me 2 lists... Well not 2 lists, But 2 different sections of sorting in the same list.
Title: Re: Ignoring articles when sorting
Post by: vagskal on November 14, 2011, 06:55:06 am
I changed [name] to [artist] and tried (^The|/.) but it gave me 2 lists... Well not 2 lists, But 2 different sections of sorting in the same list.

Try (^The |\.) instead (a space after The and a backslash which is the escape character inside regular expressions; I have not tested but I think this will work):
Code: [Select]
Regex([Name],/#(^The |\.)?(.*)#/,-1)If(IsEmpty([R1]),[Name],If(IsEqual([R1],.),[R2],[R2]/,/ The))
Sorry for the late reply. Although the thread is about ignoring I was not ignoring you. I just misplaced your reply by accident for a while.
Title: Re: Ignoring articles when sorting
Post by: Matt on November 14, 2011, 01:42:44 pm
Coming in 17.0.34 and newer:
NEW: Typed navigation in lists or Theater View honors the user setting for ignoring articles (Options > Tree & View > Sorting).
Title: Re: Ignoring articles when sorting
Post by: vagskal on November 14, 2011, 02:06:16 pm
Coming in 17.0.34 and newer:
NEW: Typed navigation in lists or Theater View honors the user setting for ignoring articles (Options > Tree & View > Sorting).

Well, that is a nice surprise. Thanks! An important step for the everyday user experience.

Will it work in panes as well?
Title: Re: Ignoring articles when sorting
Post by: Matt on November 14, 2011, 02:17:28 pm
Well, that is a nice surprise. Thanks! An important step for the everyday user experience.

Will it work in panes as well?

It should work everywhere.  If you find a place it doesn't work, just report it as a bug.
Title: Re: Ignoring articles when sorting
Post by: vagskal on November 14, 2011, 02:20:42 pm
It should work everywhere.  If you find a place it doesn't work, just report it as a bug.

Great! Thanks again.
Title: Re: Ignoring articles when sorting
Post by: gappie on November 14, 2011, 02:32:19 pm
Coming in 17.0.34 and newer:
NEW: Typed navigation in lists or Theater View honors the user setting for ignoring articles (Options > Tree & View > Sorting).
wow.. great. after all these years.. im so happy.
 :)
gab

ps.. now if only we could tell mc what articles to not use. le, la , de, el, het, der, dem, das, die... etc ;)
Title: Re: Ignoring articles when sorting
Post by: rjm on November 14, 2011, 02:39:08 pm
Coming in 17.0.34 and newer:
NEW: Typed navigation in lists or Theater View honors the user setting for ignoring articles (Options > Tree & View > Sorting).

Wow! This is REALLY great. The biggest UI annoyance is history. Thank you!
Title: Re: Ignoring articles when sorting
Post by: audunth on November 16, 2011, 05:33:55 pm
Thanks, Matt :)
Title: Re: Ignoring articles when sorting
Post by: fitbrit on November 16, 2011, 07:11:38 pm
wow.. great. after all these years.. im so happy.
 :)
gab

ps.. now if only we could tell mc what articles to not use. le, la , de, el, het, der, dem, das, die... etc ;)

Stimmt. :)