INTERACT FORUM

Please login or register.

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

Author Topic: Another Expression question  (Read 1095 times)

fitbrit

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4877
Another Expression question
« on: May 14, 2010, 02:51:26 pm »

My experience with expressions is still very limited, but I'm using them more and more to make tagging easier. I only use very basic expressions, but am now ready to brave more complex ones.

Let's say I have 4 seasons of a TV show, each with 13 episodes. Typically, I name the album field with the Program name and season number, e.g. [program] = Familyrama; [album] =  Familyrama S01. I want the [name] tags to be Familyrama S01E01 to Familyrama S01E13, and then Familyrama S02E01 to Familyrama S02E13 for season 2.
Currently, I rename the [name] field to:
=[album]E0Counter(1)

However, there are two issues with this:

1) Episodes 10 onwards have an extra 0, e.g. Familyrama S01E010 Familyrama S01E011 and Familyrama S01E013, which I manually remove by selecting the files and find and replacing.

2) I have to apply the expression one season (album) at a time. Otherwise, what should be Familyrama S02E01 becomes Familyrama S02E14, as a continuation of the "counter". Is there any way that the counter can be made to reset when the album value changes from S01 to S02 etc.? I'm sure there's a completely different way of going about this altogther, so I'd be very happy to hear your solutions.

Cheers.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42002
  • Shoes gone again!
Re: Another Expression question
« Reply #1 on: May 14, 2010, 03:28:36 pm »

For television, we recommend using the standard naming scheme:

Series: Name of series
Season: Number or year
Name: Name of episode

You can then use the expressions TVInfo(NameDisplay), TVInfo(NameDisplayWithDate), TVInfo(SeriesDisplay), etc. to build a nicely formatted name that understands that all TV shows don't have a series / season.
Logged
Matt Ashland, JRiver Media Center

fitbrit

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4877
Re: Another Expression question
« Reply #2 on: May 15, 2010, 12:10:51 am »

Thanks Matt, I'll have to try it with a bulk move/copy fields.
Logged
Pages: [1]   Go Up