metamask help

Help each other out

metamask help

Postby mememe on Thu Nov 13, 2008 10:55 pm

I posted this in my skin channel too. If that's against a rule or something, let me know.

Anyway, I am trying to get my tv shows (from DVD) to import correctly, but can't seem to get it to work right. My directory structure is:

TV\SHOW\SEASON\EPNUM - EPTITLE.mkv
(e.g. TV\ANGEL\SEASON 01\S01 E01 - CITY OF.mkv)

I would like it to import as:
TV\<series>\<season>\<epnumber> - <name>

This gets me most of the way there:

\\(?<Series>.*)\\Season\s(?<Season>\d*)\\.(?<EpNum>\d*)\s-\s(?<Name>.*)\. *
\\(?<Series>.*)\\Season(?<Season>\d*)\\.(?<EpNum>\d*)\s-\s(?<Name>.*)\. *
\\(?<Series>.*)\\(?<Season>.*)\\(?<Name>.*)\. *

I just can't get it to parse the "S01 E01" to <epnumber>. Instead it returns "S01 E01 - CITY OF" as <name> and doesn't even create a <epnumber> or value for it.

Any help is appreciated.
mememe
 
Posts: 75
Joined: Thu May 29, 2008 12:23 am

Re: metamask help

Postby mememe on Fri Nov 14, 2008 1:33 am

Ok, I've been playing with it some more and got this:

\\(?<Series>.*)\\Season\s(?<Season>\d*)\\.(?<EpNum>\d*)\s-\s(?<Name>.*)\. *
\\(?<Series>.*)\\Season(?<Season>\d*)\\.(?<EpNum>\d*)\s-\s(?<Name>.*)\. *
\\(?<Series>.*)\\(?<Season>.*)\\*\s-\s(?<Name>.*)\. *
\\(?<Series>.*)\\(?<Season>.*)\\(?<EpNum>\d*)\s*\. *

It does everything I wanted correctly except for one thing. Rather than creating the <epnum> and populating it with the s01 e01, it returns "Season 01\S01 E01 -" and writes it to <directory>. <name> and <series> are exactly right though. Although this will work for my setup, I'd prefer to figure out why it's not doing what I want and rectify it so I'm still hoping someone can see where I messed up.

Thanks guys.
mememe
 
Posts: 75
Joined: Thu May 29, 2008 12:23 am

Re: metamask help

Postby m_ski on Fri Nov 14, 2008 12:48 pm

Try this to replace your last line above...

Code: Select all
\\(?<Series>.*)\\(?<Season>.*)\\(?<EpNum>.*)\s-. *


I am not exactly sure what is wrong with your string but this one seems to work when I test it in Expresso http://www.ultrapico.com/Expresso.htm (very useful tool for debugging regular expressions.)

I have kind of fumbled my way through regular expressions to get them doing what I want.

I think that xlobby will run through each of your regular expressions and will use the first one that generates a match. I suggest trying just one line at a time to ensure you know which expression is actually being used
m_ski
 
Posts: 204
Joined: Wed Dec 08, 2004 7:57 am
Location: Kent, United Kingdom

Re: metamask help

Postby mememe on Fri Nov 14, 2008 5:58 pm

Thanks for the reply. I added that as the last line, but got the same result. However, your suggestion did get me closer to how to pull the epnumber correctly. So, I took your advice and went through line by line, and was rather surprised. I was able to accomplish my goal with this:

\\(?<Series>.*)\\Season(?<Season>\d*)\\.(?<EpNum>\d*)\s-\s(?<Name>.*)\. *
\\(?<Series>.*)\\(?<Season>.*)\\(?<EpNum>.*)\s-\s(?<Name>.*).... *

It gets the <series>, <season>, <directory>, <epnum>, and <name> fields all exactly right for my file naming scheme. That's everything I needed, and I no longer have to manually edit the database.

Thank you for your help and advice. I probably would have been pulling my hair out much longer if you hadn't offered that.
mememe
 
Posts: 75
Joined: Thu May 29, 2008 12:23 am