INTERACT FORUM

Please login or register.

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

Author Topic: [18.0.106] Clean out numbering in Name tag?  (Read 2095 times)

Gatherum

  • Citizen of the Universe
  • *****
  • Posts: 651
[18.0.106] Clean out numbering in Name tag?
« on: January 20, 2013, 05:56:17 am »

So I imported some BD-ripped series episodes to MC, which are named based on their individual parent folder name: '##. Episode Name', where '##.' is the episode number, i.e. 01., 02., etc). I don't like using the TVDB to fill in stuff in the [Name] tag because their information is often either incorrect or too literal in that regard, but I tend to like everything else, from the descriptions to the thumbnailing. So, I go ahead and tell it to look up the information and apply it (by the way, despite unchecking "Allow overwrite of existing values," it still replaces the data in the [Name] tag), then use "Fill properties from filename" to get the names changed back. Thing is, it also applies the numbering that I used in the explorer folders in order to keep them in order, which I don't want because J River properly sorts each episode by [Season], [Episode], etc as I have defined it as it is.

Is there a convenient way to get rid of these numbers without having to manually go through and delete all of them from the [Name] tag?

Also, consider this a feature request to add the ability to specify what fields you do/do not want to be filled in when looking up info from an external database, if possible.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: [18.0.106] Clean out numbering in Name tag?
« Reply #1 on: January 20, 2013, 01:12:23 pm »

Show a couple of example file names if you would.  Thanks.
Logged
The opinions I express represent my own folly.

Gatherum

  • Citizen of the Universe
  • *****
  • Posts: 651
Re: [18.0.106] Clean out numbering in Name tag?
« Reply #2 on: January 21, 2013, 07:33:27 pm »

Here are some screens...

Outside MC...

This is how I want my stuff named in Explorer.

Inside MC...

Basically, I want the "EP01., EP02., etc" gone inside MC. This is, of course, easily accomplished simply by going through and renaming each file manually, but I'm just wondering if there's another way.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: [18.0.106] Clean out numbering in Name tag?
« Reply #3 on: January 21, 2013, 08:47:55 pm »

Select the files, and edit the Name field.  Enter the following:

  =regex([name], /#(?:[A-Z]+\d+\.\s*)?(.*)$#/, 1)

Try one a couple first.  Undo if you don't want the changes.

You can apply the same rule to an auto-import rule for the Name field if you want (with the leading = character removed).
Logged
The opinions I express represent my own folly.

rjm

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2699
Re: [18.0.106] Clean out numbering in Name tag?
« Reply #4 on: January 21, 2013, 09:10:24 pm »

Or if you do not want to learn Regex...

Library Tools\Fill Properties From Filename
de-select Directories
select Filename with the pattern:
[]. [Name]

Which says skip everything in filename until ". " then fill Name with the remaining characters.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: [18.0.106] Clean out numbering in Name tag?
« Reply #5 on: January 21, 2013, 09:13:52 pm »

Nice.  I was not aware you can use [] to essentially assign to nothing.

Will this work also if there is no "EP30. " leader?
Logged
The opinions I express represent my own folly.

rjm

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2699
Re: [18.0.106] Clean out numbering in Name tag?
« Reply #6 on: January 21, 2013, 09:22:26 pm »

I think if the string ". " is not present then [Name] will remain unchanged.
Logged

rjm

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2699
Re: [18.0.106] Clean out numbering in Name tag?
« Reply #7 on: January 21, 2013, 09:24:51 pm »

If you want to fill Track # at the same time, select the files that start with EP and use the pattern:
EP[Track #]. [Name]
Logged

Gatherum

  • Citizen of the Universe
  • *****
  • Posts: 651
Re: [18.0.106] Clean out numbering in Name tag?
« Reply #8 on: January 22, 2013, 04:56:55 am »

I thank you guys profusely. :D

I wonder, though, what is the syntax for that Regex string? Like, why does it do what it does?
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: [18.0.106] Clean out numbering in Name tag?
« Reply #9 on: January 22, 2013, 11:53:26 am »

I wonder, though, what is the syntax for that Regex string? Like, why does it do what it does?

There are many tutorials and reference materials for regular expressions.  I've explained many on the forum here too (give regex a search).  Also see:

    http://wiki.jriver.com/index.php/Media_Center_expression_language#Regex.28....29:_Regular_expression_pattern_matching_and_capture
Logged
The opinions I express represent my own folly.
Pages: [1]   Go Up