Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.

Name:
Email:
Subject:
Message icon:

Attach:
(Clear Attachment)
(more attachments)
Allowed file types: gif, jpg, png, txt, tpl, lng, ini, pvd, psf, ini, cfg, csv, zip, xml, pas, 7z
Restrictions: 4 per post, maximum total size 1024KB, maximum individual size 1024KB
Note that any files attached will not be displayed until approved by a moderator.
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
How many words are in this question?:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: buah
« on: August 08, 2010, 12:24:00 pm »

One question though: I see "find and replace" on the scan preferences window, what does it do exactly?


I use it to replace special characters in the file and folder name. For instance:

Is There Anybody There^.avi is recognized by regex as Is Anybody There? which is proper title of the movie. Previously I set up scanner to find "^" and replace it with "?"

Also I set up these replacements:

-- -> :
~ -> "

I haven't found yet movies with special characters: *, >, <, /, \, and I have chosen ^, ~, {, }, ` (not ') for file names because of the same reason.
Posted by: deazo
« on: August 08, 2010, 11:18:48 am »


 Yes Buah I tried your Avatar example, it suggested to change the file path for the existing Avatar entry. This is not really surprising as no other entry has "avatar" in their title.

 Rick, I never realized that (year) could make a difference... I will try to rename all files and add (year) in their titles. Hopefully it won't mess too many things.

 One question though: I see "find and replace" on the scan preferences window, what does it do exactly? Can it rename filenames?

 Thanks.
Posted by: rick.ca
« on: August 06, 2010, 08:37:27 pm »

Quote
But just to clarify, and because the results I get are the same with or without Regex's listed, can I assume the program is not using these expressions?

No. See my previous message.

Quote
Also, is there not a Regex expression that would try to match ONLY full matching of titles?

No. The regex extract the <title>, <year>, etc. from the file path. They have nothing to do with finding a match in the database. The program does that.

As I said, I think the solution would be for all matches to be presented in the results window. An exact match could be listed first, and pre-selected (and any partial matches not be selected). I suppose it would also make sense to provide an option to restrict the results to exact matches.

In the meantime, I suggest you name new movies in the form [Title] ([Year]).ext, and use an appropriate regex to extract <title> and <year> ((?i)^.*\\(?P<title>) (?P<year>(19|2\d)\d{2}).*\..{3,4} should work). That will greatly improve the likelihood of exact matches, as well as resolve most ambiguities in the filenames themselves (i.e., for remakes, or movies that coincidentally have the same title). If you still have problems because existing files which are already matched are being improperly matched to other titles, you may have to rename all your existing files. You probably already have an Excel worksheet from which you can create a batch file to do this.
Posted by: buah
« on: August 06, 2010, 01:23:45 pm »

Did you, by any chance, try what I proposed to you on previous page: to reproduce my case?
Posted by: deazo
« on: August 06, 2010, 12:25:36 pm »


 Yes I did.
Posted by: buah
« on: August 06, 2010, 11:30:31 am »

Did you check "Smart detecting" checkboxes in File scanner preferences?
Posted by: deazo
« on: August 06, 2010, 08:15:29 am »


  OK thanks for your answers Rick and Buah.
  I guess the only way is the long way...
 
  But just to clarify, and because the results I get are the same with or without Regex's listed, can I assume the program is not using these expressions?
 
  Also, is there not a Regex expression that would try to match ONLY full matching of titles?
  A Regex that would basically not look for an expression within another one, and would only catch the full file name.

  Just for info, I usually add movies by batch of 20-30, so the scan can be a timesaver.
  Unfortunately I also spend a lot of time "ignoring", unticking, changing to "add new movie" (by the way, when you do that, all your previous unticking disappears... frustrating), etc...
  Also my storage drive being on my network, navigating to that path for each movie is very long indeed.
Posted by: rick.ca
« 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.
Posted by: deazo
« 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.



Posted by: rick.ca
« 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").
Posted by: buah
« 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]
Posted by: deazo
« 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]
Posted by: buah
« 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.
Posted by: deazo
« 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]
Posted by: buah
« 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?
Posted by: deazo
« 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?
Posted by: buah
« 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?
Posted by: deazo
« on: August 05, 2010, 01:09:42 pm »


 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]
Posted by: buah
« on: August 05, 2010, 01:00:11 pm »

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
Posted by: deazo
« on: August 05, 2010, 12:56:45 pm »


 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? 
anything