INTERACT FORUM

Please login or register.

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

Author Topic: Sort Name  (Read 2251 times)

muzicman0

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1239
Sort Name
« on: March 24, 2016, 07:07:00 pm »

I would like to add a field to my library called 'Sort Name'.  I would like the value to default to the Name of the file...unless I change it.

Then, in Theater view, I can sort by 'Sort Name', and get all my grouped movies to be together.

An example would be The Dark Knight Trilogy...

Batman Begins
The Dark Knight
The Dark Knight Rises

I could sort these by Batman 1, Batman 2, and Batman 3 in the Sort Name field so that they are listed together, and in the right order in Theater View.

The trick is to make auto imported files default to the Name field, but to not change the Name field if I change the Sort Name field...

Make sense?  Is it possible?
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Sort Name
« Reply #1 on: March 24, 2016, 07:54:17 pm »

I would like to add a field to my library called 'Sort Name'.  I would like the value to default to the Name of the file...unless I change it.

You can do this for sure.  You can use a system similar to how [Album Artist] and [Album Artist (auto)] work.  But you don't need to for this particular task.  I'll explain another way below.

Quote
Then, in Theater view, I can sort by 'Sort Name', and get all my grouped movies to be together.

An example would be The Dark Knight Trilogy...

Batman Begins
The Dark Knight
The Dark Knight Rises

I do this in my Standard View and it should be similar in Theater View.  My idea works by using the [Series] and [Episode] tags to identify movie series, and their ordering.  So Batman Begins would be [Series]=Batman and [Episode]=1 .  The Dark Knight:  [Series]=Batman , [Episode]=2 .

Now you need a custom field to help the sort work properly.  In the Mange Library Fields dialog, create a new field.  I called mine [Movie Sort], but you can use any name you want.  Make it a Calculated Data field using this expression:

Code: [Select]
if(isempty([Series]),[Name],[Series] [Episode])
So it will sort by Series and Episode if they exist.  If not, it uses the Name field.

I think that will do what you are after, and make it easy for you to maintain.

If you still want to know how to do the "put in one value unless I change it" thing, I can outline that too.

Brian.
Logged

muzicman0

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1239
Re: Sort Name
« Reply #2 on: March 25, 2016, 08:54:36 am »

Thanks Brian,
I use the Series field for a different view (I group by movie series)...so if there is a way to do it the way I want, that would be great.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Sort Name
« Reply #3 on: March 25, 2016, 09:13:24 am »

Ok, here's one way of doing it that's similar to how MC uses Album Artist:

Create 3 new fields:

1.  Sort Name (manual):  Regular string field.
2.  Sort Name (default):  Calculated data:  [Name]
3.  Sort Name :  Calculated Data:  firstnotempty([Sort Name (manual)],[Sort Name (default)])

Now Sort Name will either take the value from [Sort Name (manual)] or from [Sort Name (default)] .  It will use manual if it is filled in, otherwise it will use default. ...and default is already a calculated field populated with a copy of [Name].

So that should do what you're looking for.

Good luck.

Brian.
Logged

muzicman0

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1239
Re: Sort Name
« Reply #4 on: March 25, 2016, 09:35:47 am »

Awesome, that worked.  Thanks!
Logged
Pages: [1]   Go Up