Author Topic: [FAQ] What is the best action to take when the file scanner gets it wrong?  (Read 20608 times)

0 Members and 1 Guest are viewing this topic.

Offline deazo

  • Older Power User
  • *****
  • Posts: 283
    • View Profile
 Hi all,

 what do you do when the file scanner suggestions are plain wrong?
 Just to give you a few examples:

 Filename: moon     file scanner suggestion: Change file path for "in the shadow of the moon"
 Filename: hair       file scanner suggestion: Change file path for "l'ecole de la chair"
 Filename: or         file scanner suggestion: Change file path for "American splendor"

I am bad at editing regex so what I am looking for are solutions that would stop these suggestions to pop back again when I scan another time.

When I click "ignore", what does it do exactly? does it "lock" the file for ever?

Thanks
« Last Edit: September 22, 2010, 01:14:43 am by rick.ca »

buah

  • Guest
If single movie to be scanned is in the matter, I rather do it via NMM.
If scanning several movies at once, usually I repeat scanning, but I exclude those with incorrect scanning results, and I treat them separately, one at the time via NNM.
This is because changing action to "Add new movie" (via context menu) doesn't give expected results in my case.

Offline deazo

  • Older Power User
  • *****
  • Posts: 283
    • View Profile

 What is NMM?

 Yes I am scanning several movies simultaneously, but the scanner scans the whole hard drive.

Offline CAD

  • Older Power User
  • *****
  • Posts: 168
  • I've got my eye on you!
    • View Profile
i have movies in sub directories. the actual movie can be named anything (and usually is)
directory = movie name (year)

CINEMA_PARADISO (1988)

seems to pick most of them up correctly.
i can then go and change one that arn't.
either by checking/changing date or changing imdb link manually and rescanning that particular movie
three fingered salutation

Offline deazo

  • Older Power User
  • *****
  • Posts: 283
    • View Profile

 I too have every movie in a sub directory.

 Folder name = Original movie title
 File name = Original movie title.extension

 Don't you receive wrong suggestions like the ones I have listed?

buah

  • Guest
NMM=New Movie Master

Quote
Don't you receive wrong suggestions like the ones I have listed?

No. I get "Change file path" as a results for movies with the same titles, that I already have them in database.
Deazo, looking at you establishing your database is just like looking into myself :). Exactly after importing my movies to PVD, the very next step I did, was to set up proper regexps for scanning.

Regarding this, it looks to me that it'll be more than useful for you to read this topic, and to ask for support right there.

Offline deazo

  • Older Power User
  • *****
  • Posts: 283
    • View Profile

 Buah I hate you I was trying to avoid the subject of regex's !
 I guess you're right, I should change the regex so that it only suggest changes when it finds the EXACT same filename, and not the "or" in "american splendor" !!!
 
 If you know how to do that, I wouldn't mind you telling me.  ;) Otherwise I will just have to hurt my brain, yet again.

 Thanks!

Offline deazo

  • Older Power User
  • *****
  • Posts: 283
    • View Profile

 OK, after reading the thread you suggested, I see that my situation should be dead simple.
 All my movies are organised like I described earlier:

 Folder name = Movie name
 File name = Movie name.extension

 So I don't understand why the scanner would suggest that the file hair.avi could be the movie "l'ecole de la chair" ?
 Just because "hair" can be found in "chair"?
 How can I tell it to only suggest that "hair" can only be a full title?
 Would you know? 

buah

  • Guest
I will just have to hurt my brain, yet again.

Just like I did. :D
First of all - from regex you can get only title, original title, year, season number, episode number, episode title.
Second of all - it all depends on your file naming convention.

Now, I'm not good wit regex at all, so what I did was to found proper regexp for my naming convention. Eventually I realized that I had to slightly modify naming convention itself, which is now:

ID. Title - OrigTitle (Year) (Category) [Whatever-else].ext

(Please notice a dot, spaces and brackets)

For this convention, regex that works for me is (nostra helped me to find it out):

(?i)^.*\\(?P<title>.*) - (?P<origtitle>.*) \((?P<year>[0-9]{4})\).*


To conclude:
- You can't avoid the subject of regex's if you want to scan your files
- You must unify naming videos
- You have to experiment to find out which regex is suitable for your naming convention.
- You have to move that regex at the top of regexes in preferences.


Edit: You posted while i was writing an answer. Try the regex that works for me, and modify it if it's possible to work for you
« Last Edit: August 05, 2010, 01:03:25 pm by buah »

Offline deazo

  • Older Power User
  • *****
  • Posts: 283
    • View Profile

 OK,

 Yes by looking at the thread I realised there was a priority order in the regex list.

 Considering how I named my movies (see above) I assumed the first part of your regex should work for me:
 
 (?i)^.*\\(?P<title>.*)\..*

 So I moved it to the top.

 I am still getting the results I mentioned, see the screen attached.
 
 Question: is the "(?i)^" part of the expression looking for "anything" before the title?

 

 

[attachment deleted by admin]

buah

  • Guest
Re: What is the best action to take when the file scanner gets it wrong?
« Reply #10 on: August 05, 2010, 01:24:10 pm »
I would try my regex as given.

And, in your regex there are two dots at the end?

Edit: now I noticed hat the labes of your HDD's are in brackets. Can you label one of them without brackets, and try it?
« Last Edit: August 05, 2010, 01:29:41 pm by buah »

Offline deazo

  • Older Power User
  • *****
  • Posts: 283
    • View Profile
Re: What is the best action to take when the file scanner gets it wrong?
« Reply #11 on: August 05, 2010, 01:27:54 pm »

 OK, yes I had noticed the two dots afterwards.
 I have tried your regex and no success.

 HOWEVER, I have removed ALL regexes from the preferences. It gives me exactly the same results... is this possible?
 Can the regex be ignored by some obscure setting that I do not know off?

buah

  • Guest
Re: What is the best action to take when the file scanner gets it wrong?
« Reply #12 on: August 05, 2010, 01:30:41 pm »
In case you didn't see my edit in previous post:

Quote
Now I noticed that the labes of your HDD's are in brackets. Can you label one of them without brackets, and try it?

Offline deazo

  • Older Power User
  • *****
  • Posts: 283
    • View Profile
Re: What is the best action to take when the file scanner gets it wrong?
« Reply #13 on: August 05, 2010, 01:35:52 pm »

 Yes i did not see your EDIT.

 My hard drives are on the network so I'm scanning through the network.
 So I have just tried on a test folder on the computer with fake files, see the screen attached.

[attachment deleted by admin]

buah

  • Guest
Re: What is the best action to take when the file scanner gets it wrong?
« Reply #14 on: August 05, 2010, 01:55:53 pm »
Assuming that you've put back regex(es), for now I can give you only one guess. Put your "or" folder directly on a desktop, capitalize first letters of a folder and of a file and scan it.

My regex should work if you have at least title in your file name, and you have it.

Offline deazo

  • Older Power User
  • *****
  • Posts: 283
    • View Profile
Re: What is the best action to take when the file scanner gets it wrong?
« Reply #15 on: August 05, 2010, 02:04:39 pm »

 Here is the result, not good.

 I guess we should wait for Nostra and Rick to help me out hey, unless you have another suggestion?
 I wonder if it's not a Windows setting rather than a PVD one that is preventing these regex's to be used...?

 

[attachment deleted by admin]

buah

  • Guest
Re: What is the best action to take when the file scanner gets it wrong?
« Reply #16 on: August 05, 2010, 02:15:03 pm »
Well, I think you should wait for them.

Till then, here's my example how it works for me. Maybe you should try to reproduce this case (naming folders and files, locations, etc).
If you don't get the same result as I do, ready your brain for exploding :P

[attachment deleted by admin]
« Last Edit: August 05, 2010, 02:16:47 pm by buah »

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: What is the best action to take when the file scanner gets it wrong?
« Reply #17 on: August 05, 2010, 06:57:37 pm »
Sorry, I'm not sure what the problem is. As far as the regex goes, (?i)^.*\\(?P<title>.*)\..* seems appropriate. It means...

(?i) - using case insensitive mode...
^.*\\ - from the beginning of the string, match any number of any character until a "\"...
(?P<title>.*)\. - then match any number of any character until a "." and save this as <title>...
.* - then match any number of any character.

This won't handle periods in titles or resolve ambiguities using <year>, but otherwise should work as expected. That is, save the string between the last "\" and the following "." as <title>.

Maybe the problem is in what the program does with the <title> returned by the regex. From your examples, it seems it's matching what it finds to titles which end in the same string (e.g., or to American Splendor). Are these all new movies you're trying to add via the scanner? Maybe the result would be different if such titles existed in the database—so there could be an exact match.

So the answer to your original question might be to simply create the movie record, then scan. That might be the best you can do when the filenames do not include <year> to resolve ambiguities.

The scanning routine could use some improvement. In particular, the results window should provide the means to fix this sort of thing (e.g., "no, not American Splendor, add a new movie with the title Or").

Offline deazo

  • Older Power User
  • *****
  • Posts: 283
    • View Profile
Re: What is the best action to take when the file scanner gets it wrong?
« Reply #18 on: August 05, 2010, 09:10:10 pm »

 
 "Or" is actually a record in my database (http://www.imdb.com/title/tt0388311/) so I am not trying to add a new movie.
 American splendor is also a record.
 So creating the record before hand cannot solve this.

 Another thing is that the results are the same with or without the Regex's. If I empty them in preferences and run a scan, it will give me the same suggestion.
 So I suspect the program is not even using the Regex's!
 It must then use the default settings, but what are they?
 I'm lost here, maybe I should try scanning with a different computer what do you think, could it be a setting on my computer?
 This is a fresh install of pvd by the way.




Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: What is the best action to take when the file scanner gets it wrong?
« Reply #19 on: August 05, 2010, 11:25:15 pm »
Quote
Another thing is that the results are the same with or without the Regex's. If I empty them in preferences and run a scan, it will give me the same suggestion. So I suspect the program is not even using the Regex's!

I never thought of trying that. But it doesn't follow the program is not using the regex. It's more likely that the program logic uses the same thing (the string between the last "\" and ".") in the event there are no regex matches. Maybe it's just taking the first (partial) match found, based on the assumption there are unlikely to be duplicates. This seems to be a bad assumption given your filename structure, but it works reasonably well if there's a year that can be matched as well. I imagine the requirement that the filename match the title exactly would be too restrictive for most users.

I don't know how the scanning time would be affected, but maybe the scanner should present all matches—so the user can select the correct one in the results window.

Meanwhile, the only thing I can suggest is that you enter the file path "manually" in such cases. Unfortunately, that means adding the incorrect items the ignore list, and noting the titles so they can be looked up after the scan routine is otherwise complete.