Author Topic: Help with File Scanner...  (Read 6260 times)

0 Members and 1 Guest are viewing this topic.

Offline mojibake

  • Member
  • *
  • Posts: 3
    • View Profile
Help with File Scanner...
« on: January 21, 2010, 09:43:30 pm »
Hi, Just found this software and it looks great. Only problem is my understanding of Regex. I have been reading the site which is often referenced http://www.regular-expressions.info/tutorial.html and have made a list of functions but I am still confused.

My files are named like this...

title_source.mkv

The only problem is all my titles use a hyphen rather than a space i.e bigger-than-life_dvd.mkv or imagine-werner-herzog_dvb.mkv for freeview recordings.

I tried a few things to ignore anything beyond the _ with no luck.

I also tried to use the find replace function finding all "-" which works fine but I can't specify what to replace it with so all the titles become biggerthanlife_dvd etc.

Also the programme finds most of the titles fine anyway but insists on creating two entries one linked to the the file with the filename as title and the correct title with no linked file. If it can find the title why doesn't it replace my filename with the title I identified?

Hope this make sense. Bascally I would like to know how to parse all "-" as spaces and record anything before "_" as the title.
Any help appreciated.

Thanks
Mojibake

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Help with File Scanner...
« Reply #1 on: January 22, 2010, 01:31:32 am »
Welcome, mojibake.

Quote
My files are named like this: title_source.mkv
I tried a few things to ignore anything beyond the _ with no luck.

(?i)^.*\\(?P<title>.*)_.*\..* should work. '.' means any character, and '\' makes the following special character literal—so this statement says "match any number of any character between '\' and '_' as Title, followed by any number of any character and any extension."

Note the regex statements are applied only until a match is found. It would be easy to suggest you could use this and delete all the rest, but you may want/need other patterns to be matched. Regex are meant to handle different patterns (and, normally, a movie has a different pattern than an episode of a series). So there are multiple regex statements in the default configuration for matching different common patterns. That much is straightforward, but it's also important to remember that more than one statement can match a pattern. It's therefore important to remember the statements should be put in an order whereby the "correct" one is applied first.

Quote
I also tried to use the find replace function finding all "-" which works fine but I can't specify what to replace it with so all the titles become biggerthanlife_dvd etc.

There seems to be a bug (nostra, are you listening?) in the configuration dialog that renders the "Replace with" column inaccessible. A workaround is to edit pvdconfig.ini directly. Data in the [FileScanner] section is tab-delimited, so it's necessary to use an editor like Notepad++ that can show tab symbols.


Offline mojibake

  • Member
  • *
  • Posts: 3
    • View Profile
Re: Help with File Scanner...
« Reply #2 on: January 22, 2010, 06:45:18 pm »
Rick this is really helpful, thank you.

I just placed the statement at the top of the list and it worked fine.

I am having trouble finding pvdconfig.ini though? I searched the entire c: directory with no luck. I am running windows 7.

Also although it found the title pvd still imported two titles. The filename and the imdb title it found using the filename. Is there a setting I need to change? If it finds the correct title on imdb and I identify it as so why is it still using my filename? Is this something which will go away when I fix the .ini file to ignore hyphens?

Sorry one last question. When I find the .ini file how would I specify a space? " "?

Thanks again,
Mojibake

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Help with File Scanner...
« Reply #3 on: January 22, 2010, 08:53:13 pm »
Quote
I am having trouble finding pvdconfig.ini though?

You should find it in C:\Users\%USERNAME%\AppData\Roaming\Personal Video Database\ or simply %APPDATA%\Personal Video Database\. You probably need to enable the viewing of hidden files via Folder Options.

Quote
When I find the .ini file how would I specify a space?

Using the spacebar. ;)  You'll see it if you use Notepad++ set to view tabs.

Quote
Also although it found the title pvd still imported two titles.

I don't know what this is about. While you can set the file scanner to run the IMDb plugin, these are two separate processes. To properly troubleshoot, you need to separate them. Un-check the boxes at the bottom of the scanned files dialog, and tell us exactly what the file scanner does. Then select the movie added by the file scanner, run the IMDb plugin and tell us exactly what it does (including how you respond to any prompts).

Quote
Is there a setting I need to change?

I don't know. Have you reviewed all your preference settings, and do you understand what they all mean? Are your IMDb plugin Overwrite Fields settings properly set? To start, you should probably set them all to overwrite (i.e., a check-mark) except Title, which should be set to not overwrite (i.e., a blank check-box).

Offline mojibake

  • Member
  • *
  • Posts: 3
    • View Profile
Re: Help with File Scanner...
« Reply #4 on: January 22, 2010, 10:52:49 pm »
Fantastic. I seem to have everything working now. Thanks for the help!

I changed my settings to overwrite everything except the title but was still having issues with films with an original title, for example Youth of the Beast which is officially Yaju No Seishun. This would still duplicate with an extra entry when I imported from imdb.

It seems the solution is not to tick the title but highlight it? Does that make sense? When I get a list of proposed titles if I click on one the tick box becomes blue. If I tick it again it becomes ticked. If I leave it blue and continue it imports the data onto a single entry but if I tick it it creates a second entry.

I don't understand what the first selection is saying (if anything) but it seems to work. I will try a full import now and see what happens.

Thanks again for your help. Brilliant!
I have a few ideas/things in my head about renaming files within pvd but they are a bit off topic for this post so I will post elsewhere at some point.
mojibake

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Help with File Scanner...
« Reply #5 on: January 23, 2010, 06:30:43 am »
Quote
Fantastic. I seem to have everything working now. Thanks for the help!

You're welcome.

Quote
It seems the solution is not to tick the title but highlight it? Does that make sense?

Yes. I forgot the selection dialog works that way. According to some need I'll never understand, it allows multiple movies to be selected for download. I just double-click on the correct movie—it's faster, easier and less error-prone than selecting, then clicking OK.

 

anything