Page 1 of 1

Regular expression to import movies title

Posted: 2013-10-05 04:21:27
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
:)

Posted: 2013-10-05 09:17:45
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.

Posted: 2013-10-06 11:31:19
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??
;)

Posted: 2013-10-06 12:34:56
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.

Posted: 2013-10-06 21:26:17
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:

Posted: 2013-10-18 10:08:40
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.

Posted: 2013-10-18 16:48:06
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.

Posted: 2013-10-18 19:29:06
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.

Posted: 2013-10-18 20:55:33
by soulsnake
You can download the new filter here :
http://mickaelvanneufville.online.fr/AM ... ename3.txt

Soulsnake.