Movie Scrapers filename regex
#1
Hi,

I'm using a different naming than the standard basic recommended one and instead of renaming all my files, I would just like to be able to apply a regex on the filename to make it fit to the standard.

my naming is FRENCH_TITLE(ORIGINAL_TITLE) - DIRECTOR(YEAR).mkv 

so it would be very easy for me to use a regular expression on the filename to only keep the original title and the year.

Is it a configurable parameter to add this regex on filename or do I have to customise an add on to add this feature ?

thanks,
Reply
#2
https://kodi.wiki/view/Advancedsettings....eanstrings
Reply
#3
(2020-05-19, 00:23)olympia Wrote: https://kodi.wiki/view/Advancedsettings....eanstrings

I've been trying hard to write my regex for Kodi but I don't understand how to keep parts of my filename

What I understand is that I should leave from the filename, only the movie title and the year.

So in my case I have to remove the text between the first ( up to the second ( and replace it by a space.

the regex for that is simple \(.*\( but then I don't know to not just remove that block but to also replace it by a space.

Thanks,
Reply
#4
From the section Olympia pointed you to... Please note that everything right of the match (at the end of the file name) is removed

As far as I am aware the regex does not remove anything from the left of the filename, so you cannot remove FRENCH TITLE (
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#5
Right, I read the OP too fast. What you want is not possible currently. However, I think most of the scrapers will be able to find movies based on the French title. Missing the year will generate issues though.
Reply
#6
(2020-05-23, 09:35)olympia Wrote: Right, I read the OP too fast. What you want is not possible currently. However, I think most of the scrapers will be able to find movies based on the French title. Missing the year will generate issues though.

When I look at the default included regex, I feel that it just remove specific strings, not all what is left on the right.

<regexp>[ _\,\.\(\)\[\]\-](ac3|dts|custom|dc|remastered|divx|divx5|dsr|dsrip|dutch|dvd|dvd5|dvd9|dvdrip|dvdscr|dvdscreener|screener|dvdivx|cam|fragment|fs|hdtv|hdrip|hdtvrip|internal|limited|multisubs|ntsc|ogg|ogm|pal|pdtv|proper|repack|rerip|retail|r3|r5|bd5|se|svcd|swedish|german|read.nfo|nfofix|unrated|extended|ws|telesync|ts|telecine|tc|brrip|bdrip|480p|480i|576p|576i|720p|720i|1080p|1080i|3d|hrhd|hrhdtv|hddvd|bluray|x264|h264|xvid|xvidvd|xxx|www.www|cd[1-9]|\[.*\])([ _\,\.\(\)\[\]\-]|$)</regexp>

It's not that easy to read, but I believe there is a way to just remove parts of the filename without losing all the right part.

It's just that I can't find documentation on how it works. Also, I didn't find how to enable logs just to see the filename after processing.
Reply
#7
To update on the issue: I've managed to get logs. It remove everything after first keyword is found. So As said it doesn't work in my case if I want to keep the year witch is an important info.

this <cleanstrings> setting is part of universal movie scrapper or part of Kodi ?
Reply

Logout Mark Read Team Forum Stats Members Help
Movie Scrapers filename regex0