Author Topic: File Scanner & RegEx Question....  (Read 12074 times)

0 Members and 1 Guest are viewing this topic.

Offline katleeh

  • User
  • ***
  • Posts: 55
    • View Profile
File Scanner & RegEx Question....
« on: May 30, 2011, 07:59:51 pm »
I've got a question here... Oftentimes I will add the information for a TV series or movie manually and download the info from TVDB or whichever site I use and then scan the hard files later. Is there a faster way of doing this as opposed to having to go to each file and manually doing it? When you have large series that takes awhile. I notice that when I put a disk in the drive, and PVD is active, it brings a new menu up, but i have no clue what any of the options mean in relation to adding the stuff. I've clicked on the options before but they assign the info to the wrong record or seem to do nothing. How can I insert a disk with several episodes of a series on it, then specify which record they are supposed to be assigned to as well as getting images from them and such?

Thanks
- Katleeh

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: How to Connect Video Files to Various Records....
« Reply #1 on: May 30, 2011, 08:31:47 pm »
Quote
I've clicked on the options before but they assign the info to the wrong record or seem to do nothing.

Have you specified regex in the File scanner configuration that will recognize the file names on the disk? What kind of disks are they? Is the scanner configured properly for files on your HDD? If so, is the same file naming convention used for files on disk?

Offline katleeh

  • User
  • ***
  • Posts: 55
    • View Profile
Re: How to Connect Video Files to Various Records....
« Reply #2 on: May 30, 2011, 08:41:01 pm »
No, they are not using the same naming convention. DVD+Rs and DVD-Rs. Um, what is regex? The scanner seems to work fine, but tries to assign all the files to the same episode, if that makes sense.

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: How to Connect Video Files to Various Records....
« Reply #3 on: May 30, 2011, 10:44:52 pm »
Quote
Um, what is regex?

The file scanner uses Regular Expressions to extract information from file names. Search the forum for "regex" to learn more.

Offline katleeh

  • User
  • ***
  • Posts: 55
    • View Profile
File Scanner & RegEx Question....
« Reply #4 on: June 02, 2011, 07:46:51 am »
Okay, I've looked over various things but the regex coding seems rather confusing... On some of my disks I have several video files that are related to a specific thing whether its a series, individual's website, etc and I have them stored in one directory. First, is there a way to have it take all the files under a directory and then put them all under either an existing or a new series? Second, is there any way to get it to ask you where you want the files to be stored under? Its kind of annoying having to figure out a code when I just want it to scan the files and put them under a specific location numbering itself if there aren't any numbers.

I also have discs for series with various episodes on them and the file scanner usually hiccups and won't let me connect it to the stuff already in the database.

- katleeh

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: File Scanner & RegEx Question....
« Reply #5 on: June 02, 2011, 10:51:50 am »
Quote
First, is there a way to have it take all the files under a directory and then put them all under either an existing or a new series?

Yes. The "manual" control for adding files to File path allows multiple files or entire folders to be added.

Quote
Second, is there any way to get it to ask you where you want the files to be stored under?

No, not in the scan results dialog. There, the only options are to accept the match it finds, change it to a "new movie" or ignore it.

Quote
Its kind of annoying having to figure out a code when I just want it to scan the files and put them under a specific location numbering itself if there aren't any numbers.

I don't understand what you mean by this. Regex can match any patterns found anywhere in the pathname and assign them to variables that will uniquely identify a movie or episode. I doesn't get any better than that. If there are no consistent patterns, of course, then there's no basis for regex or any other system to make such matches. In the end, you'll have to settle on some combination of...

  • designing set of regex that will recognize the filenames you use;
  • changing your file naming conventions so they can be understood by regex; or
  • assigning the files manually.

Offline katleeh

  • User
  • ***
  • Posts: 55
    • View Profile
Re: File Scanner & RegEx Question....
« Reply #6 on: June 02, 2011, 07:22:46 pm »
Okay, let me see if I can explain this. Right now I have a disc in my drive with 2 directories on it and each has about 16 video files in those directories. There are no numbers on the files, just file names as they were downloaded off someone's site and all are related to the person which the directory names. Now, like a few other programs I've used (and still use), I want the program to either take the files as a separate episode of the same series which I've either already highlighted or will enter once its scanned the files. Either way the files should be getting put under the same series, not as the same movie which is lumping all the files together. So far I've been doing this manually, but that is way too time consuming and I just don't have the time for it causing me to just skip some things because of that. (You try entering one in where you have 20 or 30 files there.) This is not only getting annoying but just taking up too much time. And I don't understand the format of the file scanner to do anything with it.

So the question is, how do I set this up to do what I need it to do?

- Katleeh

Offline katleeh

  • User
  • ***
  • Posts: 55
    • View Profile
Re: File Scanner & RegEx Question....
« Reply #7 on: June 02, 2011, 07:30:09 pm »
If it helps any, this is how a lot of my stuff is named as far as file convention goes:

For the one I'm currently trying to scan, the files are named
<directory name is the series name>\<episode title>.wmv

For other series I'm trying to scan, I've already got the series info in the database and just want to connect the files, but when I burned the discs, I had to delete the series name so that it would burn on the disc properly. So that leaves the following format:

<Ep #> - <Episode Title>.mkv

I'd have to enter the series it connects to manually, or it would need to ask me which series to connect it to.

- Katleeh

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: File Scanner & RegEx Question....
« Reply #8 on: June 02, 2011, 08:11:53 pm »
Quote
For the one I'm currently trying to scan, the files are named
<directory name is the series name>\<episode title>.wmv

The scanner should be able to match those with regex using <title> and <eptitle>. Something like...

(?i)^.*\\(?P<title>.*)\\(?P<eptitle>.*)\..{3,4}.

Quote
So that leaves the following format: <Ep #> - <Episode Title>.mkv

Try this (I'm not sure it will work if your files don't have season numbers): Manually assign all the files to the series record. Then use Organize files by episodes to assign them to the episode records.

Offline katleeh

  • User
  • ***
  • Posts: 55
    • View Profile
Re: File Scanner & RegEx Question....
« Reply #9 on: June 02, 2011, 08:28:29 pm »
Okay what do you mean by manually assign the files then organize them? I thought that's what I've been doing that's taking so long...

And thank you for the regex code. Ill try it and see if that helps.

- katleeh

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: File Scanner & RegEx Question....
« Reply #10 on: June 02, 2011, 08:38:56 pm »
Quote
Okay what do you mean by manually assign the files then organize them?



[attachment deleted by admin]

Offline katleeh

  • User
  • ***
  • Posts: 55
    • View Profile
Re: File Scanner & RegEx Question....
« Reply #11 on: June 02, 2011, 09:49:33 pm »
Okay so you are adding all the files to a single record and then telling it to reorganize them will seperate them or are you using a .log file to show where all the files are?

- katleeh

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: File Scanner & RegEx Question....
« Reply #12 on: June 02, 2011, 10:16:01 pm »
The log file has nothing to do with what I was trying to illustrate. Please just try the control yourself. I'm sure you'll find it self-explanatory.

Offline katleeh

  • User
  • ***
  • Posts: 55
    • View Profile
Re: File Scanner & RegEx Question....
« Reply #13 on: June 03, 2011, 07:20:41 am »
Sigh, sadly, its not... the "organize files by episodes" option is greyed out.

- Katleeh

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: File Scanner & RegEx Question....
« Reply #14 on: June 03, 2011, 08:58:11 am »
If there are multiple files recorded in File path, the command should be available. It does seem to require episode numbers, however, in order to assign the files to episodes. It will not match by episode title.

Offline katleeh

  • User
  • ***
  • Posts: 55
    • View Profile
Re: File Scanner & RegEx Question....
« Reply #15 on: June 03, 2011, 07:45:06 pm »
*nods* Yeah... it seems to be having a bit of a fit at times, for lack of a better word. I've tried it with some smaller episode anime series and it... worked? Well... With an OAV that was about 12 eps long it tried to add the files, but got confused because the file names had part of the titles in them. So I ended up with ep 7 being assigned to the record for ep 8, ep 12 assigned to record for ep 3... weird... Tried it on another series that was about the same length with  similar results...

Going to have to play with the settings to see what I can come up with.

- Katleeh