INTERACT FORUM

Please login or register.

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

Author Topic: Import Video Media Sub Type based on Duration  (Read 969 times)

monkbroc

  • Recent member
  • *
  • Posts: 22
Import Video Media Sub Type based on Duration
« on: November 25, 2012, 08:01:26 am »

I have a folder structure that contain both movies and TV shows. Is there a way to have MC import the Media Sub Type field based on the duration? I'd like to have all videos less than 1h tagged as TV Show and above 1h as Movie. Can you suggest an expression for this and where to put it in MC?

Thanks.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Import Video Media Sub Type based on Duration
« Reply #1 on: November 25, 2012, 11:46:52 am »

In your Auto-import rules for the folder tree, create a Media Sub Type rule with the expression:

ifelse(isequal([Media Type], Video),
   if(compare([duration,0], <, 3600), TV Show, Movie))
Logged
The opinions I express represent my own folly.

monkbroc

  • Recent member
  • *
  • Posts: 22
Re: Import Video Media Sub Type based on Duration
« Reply #2 on: November 25, 2012, 02:37:21 pm »

Thanks! It works perfectly.

Just to clarify for other users, I had to go to Tools -> Options -> Library and Folders -> Configure auto-import. Then on my folder click Commands -> Edit and in the Apply these tags section, click Commands -> Add -> Custom. Select field Media Sub Type and in the value type the expression from MrC.
Logged
Pages: [1]   Go Up