Regular expression to import movies title

If you need help on how to use the program
Post Reply
fulvio53s03
Posts: 764
Joined: 2007-04-28 05:46:43
Location: Italy

Regular expression to import movies title

Post by fulvio53s03 »

Usually my movies have a file name such this:
"Title (Author) Year.ext"
Would you suggest me a regular expression to delete "(Author)" while importing into AMC?
Is it possible to import such movie title into Translated Title instead of Original Title?
Many Thanks
:)
soulsnake
Posts: 756
Joined: 2011-03-14 15:42:20
Location: France

Post by soulsnake »

Hi,
Usually my movies have a file name such this:
"Title (Author) Year.ext"
Would you suggest me a regular expression to delete "(Author)" while importing into AMC?
I give you my generic filter to extract a movie title from movie filename.
Maybe I will update it as default in next update of AMC 4.2 beta.
Download the file bellow that contains filter and import it from window to filter filename.

http://mickaelvanneufville.online.fr/AM ... lename.txt

This regular expression will remove "(Author)":

Code: Select all

::>\([-_ a-zA-Z0-9éëèàù,.]*\) # Remove content in brakets= 
Is it possible to import such movie title into Translated Title instead of Original Title?
You can do this from "File > Import > Media files" and click on title column in preview list to set translated title instead of original title field

Soulsnake.
fulvio53s03
Posts: 764
Joined: 2007-04-28 05:46:43
Location: Italy

Post by fulvio53s03 »

@soulsnake
Thanks for your quick answer but regular expression doesn't look to be useful and file name/movie title remains the same as before:
from:
Convoy - Trincea d'Asfalto (Sam Peckinpah) 1978.avi
I obtain:
Convoy Trincea d'Asfalto Sam Peckinpah
while I wish:
Convoy Trincea d'Asfalto

Useful suggestions to use import.... should it be possible to obtain the same result using drag & drop??
;)
soulsnake
Posts: 756
Joined: 2011-03-14 15:42:20
Location: France

Post by soulsnake »

Hi,
Thanks for your quick answer but regular expression doesn't look to be useful and file name/movie title remains the same as before:
from:
Convoy - Trincea d'Asfalto (Sam Peckinpah) 1978.avi
I obtain:
Convoy Trincea d'Asfalto Sam Peckinpah
while I wish:
Convoy Trincea d'Asfalto
I test your example with the filter I give you and I have the good result:
Convoy Trincea d'Asfalto

Do you import the filter or just add the regular explession in your filter ?
I modify the filter to support all charateres, it will work even if you have special characteres en brackets:

Code: Select all

::>\(.*\) # Remove content in brakets= 
Useful suggestions to use import.... should it be possible to obtain the same result using drag & drop??
Yes but you can not import title directly in translated title.
I will add this option in a future version (4.2.1).

Soulsnake.
fulvio53s03
Posts: 764
Joined: 2007-04-28 05:46:43
Location: Italy

Post by fulvio53s03 »

After importing filter-file you gave me now it's OK!
(i wrote the filter and tried to import with drag & drop... :badidea:)
thanks! :grinking:
criza
Posts: 2
Joined: 2013-10-18 09:58:03

Post by criza »

These filter rules are great, but when I import scene releases the group name won't be stripped. Here's an example:

A.Serious.Man.2009.LIMITED.DVDRip.XviD-ESPiSE-1
is
A Serious Man ESPi SE 1

(Please note I added the -1 (for CD1) at the end myself, tho it would be great if this could be stripped, too.)

or:

There.Will.Be.Blood.CD1.DVDRip.XviD-DiAMOND
is
There Will Be Blood Di AMOND

Any solution with what rule I could fix this? Thank you.

PS I thought about stripping the whole "XviD-*" or "X264-*" if it's possible to add wildcards. Surely easier than adding all group names to the filter.
soulsnake
Posts: 756
Joined: 2011-03-14 15:42:20
Location: France

Post by soulsnake »

Hi,

I improve the filter to remove all content after commun values :

Code: Select all

::> bluray.*= 
::> hddvd.*= 
::> dvd.*= 
::> bdrip.*= 
::> brrip.*= 
::> webrip.*= 
::> divx.*= 
::> xvid.*= 
::> x264.*= 
::> h264.*= 
You can download it here :
http://mickaelvanneufville.online.fr/AM ... ename2.txt

Soulsnake.
criza
Posts: 2
Joined: 2013-10-18 09:58:03

Post by criza »

Hi & Thanks!

I found a couple more cases where the file name hasn't been stripped correctly by your filter, please see the link below, otherwise it works perfectly.

http://pastebin.com/MDcmmYW2

I'd (and others certainly too) appreciate it a lot if you could update the filter rules once again.
Last edited by criza on 2013-10-18 21:04:43, edited 1 time in total.
soulsnake
Posts: 756
Joined: 2011-03-14 15:42:20
Location: France

Post by soulsnake »

You can download the new filter here :
http://mickaelvanneufville.online.fr/AM ... ename3.txt

Soulsnake.
Post Reply