INTERACT FORUM

Please login or register.

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

Author Topic: video episode tagging question  (Read 1903 times)

nickolsj

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 64
  • nothing more to say...
video episode tagging question
« on: August 18, 2011, 11:15:01 pm »

I am trying to tag tv shows with the season/episode format "1x01" and am wondering if there is a way to do this en mass similar to numbering audio track # field from list order.  not a big deal if i cannot do it with "1x", i can append that later but if i could at least auto number the episode field like what is possible for the track # field that would be great.

any help appreciated

thx
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: video episode tagging question
« Reply #1 on: August 18, 2011, 11:38:47 pm »

You can use the Counter() function.

Select your episodes, and tag your chosen field as:

   =1xPadNumber(counter(),2)

Counter() increments once per file.  It will reset after 5 seconds.
PadNumber() gives you 2 digits.
The 1x at the beginning is just text.

See: http://wiki.jriver.com/index.php/Media_Center_expression_language
Logged
The opinions I express represent my own folly.

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: video episode tagging question
« Reply #2 on: August 18, 2011, 11:44:51 pm »

MrC beat me to it, but there's another consideration here...

Select the episode records to tag and enter =1xPadNumber(Counter(1), 2) in the first record's field. But it might be better to use the fields provided. Set [Season] = 1 and [Episode] = Counter(1). In either case, start Counter() at any value you like. If you want to use or display "1x01" somewhere, you can still do so with the expression [Season]xPadNumber([Episode], 2).
Logged

nickolsj

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 64
  • nothing more to say...
Re: video episode tagging question
« Reply #3 on: August 19, 2011, 12:10:28 am »

go it, thanks!
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: video episode tagging question
« Reply #4 on: August 19, 2011, 12:37:13 am »

MrC beat me to it, but there's another consideration here...

I had late coffee today... I'm up late buzzing, and it is too quiet around here with my wife being away on business trips (this week, away since Sunday).
Logged
The opinions I express represent my own folly.

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: video episode tagging question
« Reply #5 on: August 19, 2011, 01:24:37 am »

@ Matt, Marko, others...

As I was testing out this example, it wasn't obvious to me that MC would handle the concatenation of "1x" with the function PadNumber().

   1xPadNumber(...)

I suppose when a left paren is encountered, it has to backtrack the previous token for a match from its table of functions.  I was initially thinking in this instance the two components would have to be concatenated by another means, as in:

"1x" joined to the output of PadNumber()

It is fairly straightforward if the concatenation is

   PadNumber(...)1x, since the right paren denotes the end of the function.

Now, what about ambiguities?

   Left([Name],3)

outputs 3 characters from Name.  But happens with

   RemoveLeft([Name],3)

Does this remove 3 chars from the left of Name, or append "Remove" in front of the first 3 characters of Name?

Turns out, it does run RemoveLeft(), and not Left().

But, is it a longest match, or first found in a function name string table?  Testing Now() against IsInPlayingNow() is also consistent with the longest match theory, but it still isn't confirmed.  With no other ambiguous cases, we can't tell.

So how does one instead append the word "Remove" to the output of Left(), or the word "IsInPlayingNow" to the output of the Now() function, and furthermore, know to do this unambiguously?
Logged
The opinions I express represent my own folly.

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: video episode tagging question
« Reply #6 on: August 19, 2011, 04:59:39 am »

Quote
So how does one instead append the word "Remove" to the output of Left()...

Replace(Remove~Left(...), ~)

Less coffee might help. ;)
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: video episode tagging question
« Reply #7 on: August 19, 2011, 10:22:34 am »

I think I was trying to focus on the ambiguous aspect in my question.  The language is insufficiently specific, and therefore ambiguous, about how it handles these cases, leaving one to ask such questions.
Logged
The opinions I express represent my own folly.

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: video episode tagging question
« Reply #8 on: August 19, 2011, 12:56:51 pm »

OIC. But can the language be made more unambiguous without being made even more inaccessible to those of us with little programming skill or aptitude? In the rare case I encounter such an ambiguity (I haven't yet) I'll readily see the problem and a solution (like the goofy one suggested). And I've still got a completely unambiguous reference to help me—it either works or it doesn't.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: video episode tagging question
« Reply #9 on: August 19, 2011, 01:42:02 pm »

But, is it a longest match, or first found in a function name string table?

The longest match will be used.

In a coming build, you can use the "no escapement" sequence in the rare case where this ambiguity would be an issue:
/#Remove#/Left([Name],3)

Logged
Matt Ashland, JRiver Media Center

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: video episode tagging question
« Reply #10 on: August 19, 2011, 01:45:16 pm »

The longest match will be used.

In a coming build, you can use the "no escapement" sequence in the rare case where this ambiguity would be an issue:
/#Remove#/Left([Name],3)

Perfect!
Logged
The opinions I express represent my own folly.
Pages: [1]   Go Up