INTERACT FORUM

Please login or register.

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

Author Topic: custom movie duration field - is this the best way?  (Read 1785 times)

lise

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 946
custom movie duration field - is this the best way?
« on: November 11, 2013, 05:44:22 pm »

I use ISOs for my films, which don't import duration of the film.
No problem, I have a way around that, but was wondering if any gurus out there could think of a better way.

1. I created a field (duration-manual) just that I could enter my duration manually, in hours:minutes

I can't just use that field though because I do have some files that get duration (vob) and I don't want to spend my time manually re-entering those durations in my duration-manual field.

2. I created a 2nd duration field, DurationX that displays the default duration if it exists, or my manually entered duration:

Code: [Select]
if(isempty([Duration-manual]),[Duration],[duration-manual])

How can I incorporate the Remove Right function in this expression so that when it does display the default duration, it does so in hours:minutes, dropping the seconds?

And I gather there is no way for me to kill 2 birds with one stone by having a single field that can both be an input field AND use an expression, correct?  I'm thinking of one single field that populates itself with the default duration field if it exists (and in hours:minutes format, dropping seconds) and if there is no default duration, then it allows me to manually enter one.

Logged
A wise man once said don't count your years, but make your years count. Or was it beers?

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: custom movie duration field - is this the best way?
« Reply #1 on: November 11, 2013, 05:59:12 pm »

FirstNotEmpty([duration-manual], RemoveRight([duration],3))

An expression field is read-only, so you'll need two fields, as you're doing now.
Logged
The opinions I express represent my own folly.

lise

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 946
Re: custom movie duration field - is this the best way?
« Reply #2 on: November 11, 2013, 06:34:58 pm »

FirstNotEmpty([duration-manual], RemoveRight([duration],3))

An expression field is read-only, so you'll need two fields, as you're doing now.

Thanks  MrC.  I'm assuming that is regex? If so, it's the first one I've seen that is simple and makes sense to me ;-)
Logged
A wise man once said don't count your years, but make your years count. Or was it beers?

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: custom movie duration field - is this the best way?
« Reply #3 on: November 11, 2013, 09:21:36 pm »

You're welcome.  No Regex() - just MC's FirstNotEmpty() conditional expression.
Logged
The opinions I express represent my own folly.

lise

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 946
Re: custom movie duration field - is this the best way?
« Reply #4 on: November 11, 2013, 10:32:19 pm »

You're welcome.  No Regex() - just MC's FirstNotEmpty() conditional expression.

I never noticed that the commands had all changed. I checked today too and wondered about some of the expressions I was seeing. They look much simpler now, although after spending years learning the former (and harder) way I'm kinda worried about learning all these new ones.
Logged
A wise man once said don't count your years, but make your years count. Or was it beers?
Pages: [1]   Go Up