INTERACT FORUM

More => Old Versions => JRiver Media Center 19 for Windows => Topic started by: lise on November 11, 2013, 05:44:22 pm

Title: custom movie duration field - is this the best way?
Post by: lise 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.

Title: Re: custom movie duration field - is this the best way?
Post by: MrC 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.
Title: Re: custom movie duration field - is this the best way?
Post by: lise 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 ;-)
Title: Re: custom movie duration field - is this the best way?
Post by: MrC on November 11, 2013, 09:21:36 pm
You're welcome.  No Regex() - just MC's FirstNotEmpty (http://wiki.jriver.com/index.php/Expression_Language#FirstNotEmpty)() conditional expression.
Title: Re: custom movie duration field - is this the best way?
Post by: lise on November 11, 2013, 10:32:19 pm
You're welcome.  No Regex() - just MC's FirstNotEmpty (http://wiki.jriver.com/index.php/Expression_Language#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.