multi cd matching in movies database (regex tip)

title says it all

multi cd matching in movies database (regex tip)

Postby Cosworth on Mon Jul 05, 2004 8:17 am

I've been playing with RegEx, and I'm starting to enjoy it.
Here's what I wanted to solve:
All movies in one directory with these name combinations (example):

Troya.avi
Hellboy-cd1.avi
Hellboy-cd2.avi

Using the normal movie import I get the multi volume avi's listed once for every volume. I only want "Troya" and "Hellboy" to show in my database:

Here's the regex for that using custom import:

[EDIT - Sorry for not testing properly the 1st time around]

(?(?=.*-cd.*))\\(?<name>.*)(?=-cd[^2])
(?!(?=.*-cd.*))\\(?<name>.*)(?=\.)

1st line: IF file has "-cd" in it THEN use string before -cd but not if it contains -cd2
2nd line: IF file hasn't "-cd" in it grab text before the extension

All the-cd2's will come up blank and be listed first. Still have to work on that. Perhaps Xlobby should only import those that generate a Display value<>"" ?

Use custom import and set folder to "ignore"

Figured this might inspire someone to handle their movie collection.
Cosworth
 
Posts: 67
Joined: Tue May 11, 2004 10:46 am
Location: Denmark