INTERACT FORUM

Please login or register.

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

Author Topic: help with expression for auto-importing trailers [solved]  (Read 473 times)

tij

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1563
help with expression for auto-importing trailers [solved]
« on: October 07, 2019, 12:20:49 am »

I start to put trailers i rip from BD into NAS

It is in the same location as main title of the movie ... with "-trailer" appended to it.

So if main title is [White Vengeance (2011).mkv] ... then trailer is [White Vengeance (2011)-trailer.mkv]

Reason for this is backward compatibility with Kodi ... which atm i dont use but who knows the future

So I set up a tag rule in Auto-Import to tag trailers (basically see if filename contains "trailer")

Media Sub Type value

ifelse(regex([Filename],/#trailer#/,0,0),Trailer,Movie)

Above doesnt work ... and trailers Media Sub Type are still Movie … must be something wrong with my expression … help
Logged
HTPC: Win11 Pro, MC: latest 31(64b), NV Driver: v425.31, CPU: i9-12900K, 32GB RAM, GeForce: 2080ti
Screen: LG 2016 E6
NAS: FreeNAS 11.1, SuperMicro SSG-5048R-E1CR36L, E5-1620v4, 64GB ECC RAM, 18xUltrastar He12-SAS3 drives, 2x240GB SSD (OS)

tij

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1563
Re: help with expression
« Reply #1 on: October 07, 2019, 01:07:36 am »

got it should have used [if] instead of [ifelse]

Media Sub Type value

if(regex([Filename],/#trailer#/,0,0),Trailer,Movie)
Logged
HTPC: Win11 Pro, MC: latest 31(64b), NV Driver: v425.31, CPU: i9-12900K, 32GB RAM, GeForce: 2080ti
Screen: LG 2016 E6
NAS: FreeNAS 11.1, SuperMicro SSG-5048R-E1CR36L, E5-1620v4, 64GB ECC RAM, 18xUltrastar He12-SAS3 drives, 2x240GB SSD (OS)
Pages: [1]   Go Up