Kodi Community Forum

Full Version: Scraper not smart enough
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have tested both, the ThemovieDB scraper and the Universal one with "Scan Recursive", "Movie is in same folder with title of movie" and both. I have checked to look for title in IMBD and in ThemovieDB and this is the problem I have:

I have a 1000+ list of movies that are ordered by year in the following way:

Image

The problem is that, even though the folder is named for example (1974) Death Wish I still have to manually add the movie to the database and when I do this (Right clicking the movie, going to Movie information and doing Refresh) I get the following:

Image

Am amazed that the scraper could not know that the movie year was simply before the title instead of after it (This is my way of organizing the movies which I find it better than having the title first).

What way of edit can I do to tell the scraper to be smart enough to know that, even if the year is before it, try to do a better search for it. Know that not all movies do this but about 50% of them do and working on that many movies manually is tedious and long, specially with my fantastic internet connection (about 20-25 seconds wait time per movie).
You may look into the wiki for a way to customize the scraper pattern matching, but I have only skimmed the page, it may be a dead end.
The other alternative is to mass renaming. In perl I'd do something like this (UNTESTED, comment out the rename() before the real thing)
Code:
if(/(\(\d\d\d\d\))(.*)/{
  print "rename from $1$2 to $2$1\n";
  rename( $1.$2, $2.$1);
}
and pipe all file or directorynames into this script.
Thanks for the link and advice thd042.
The normal recognised formats are explained here: Video_library/Naming_files/Movies (wiki)
As you can understand, adding every conceivable format as a regex is impossible, so we stuck to these.

Unlike TVshows it is not possible to add an advancedsetting to add more regexes to the built in list for Movies (i guess this never came up).
You can either rename the folders or make sure every folder has a nfo file with correct tmdbid or imdbid in it, maybe an external tool could help you to generate these
I would soooo not fully trust me on this, but this _may_ work by adding to advancedsettings.xml. I have in no way tested the added () to my normal one:

Code:
<!-- <cd/dvd/part/pt/disk/disc> <0-N> -->
      <regexp>(.*?)([ _.-]*(?:cd|dvd|p(?:ar)?t|dis[ck]|d)[ _.-]*[0-9]+)(.*?)(\.[^.]+)$</regexp>
    <!-- <cd/dvd/part/pt/disk/disc> <a-d> -->
      <regexp>(.*?)([ _.-]*(?:cd|dvd|p(?:ar)?t|dis[ck]|d)[ _.-]*[a-d])(.*?)(\.[^.]+)$</regexp>
    <!-- movienamea-xvid.avi, movienameb-xvid.avi, should also capture (year) before name -->
      <regexp>(.*?)(\(^.\))([ ._-]*[a-d])(.*?)(\.[^.]+)$</regexp>

If it works, enjoy.

EDIT: Didn't fully read what Kibje said, this has worked well in the past though to capture other patterns than default.
Praesten, in which tag would you have him place this ?

As far as i know there is a advancedsettingstag for movie stacking, and for tvshow name matching, but there is not one for moviename matching.