Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1
  • 10
  • 11
  • 12(current)
  • 13
  • 14
  • 17
Regular Expressions
Ok, can someone please just post, the BEST MOST ACCURATE FULL PROOF REGEX and a good example of file structure so I can change to it :-D
Or, even a good example of the new Current default regex.
Reply
If you use:

1x02foo.avi you won't have a problem with current (as in what kraqh3d just committed)

Alternatively, s01e01foo.avi will be fine as well.

Basically, anything that has a simple, easy to differentiate season and episode number is fine to use.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
ok, i take it you can also have:

1x02 - episode name.avi
Reply
indeed - we do not care what comes after the season + episode identifier in this case.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
I found my problem and a possible bug in xbmc at the same time
The two ep's that wouldnt add:

Trailer Park Boys
Season 1 - Episode 1
NAME: Season 1/01 - Take Your Little Gun and Get Out of My Trailer Park.avi
Season 2 - Episode 1
NAME: Season 2/01 - What in the Fuck Happened to Our Trailer Park.avi

I renamed my avi's just to : 01.avi for both seasons and they add in fine..
hmmm, so something in the name of my .avi is causing the issues.
So, i looked what is common....
The words "TRAILER PARK"
so, i tried removing each word, if i remove just PARK, still no go.
But as soon as i remove the word TRAILER from my filename, it adds fine.
So, somehow XBMC is not importing an episode with the show name in it...
Any thoughtsHuh?
Reply
But, with just PARK in the name, still adds.
So, it must be only if the first word of the Show name is in the episode name....
But, then, wouldnt heaps of people have issues apart from me...eg:
THE office

01 - foo THE foo.avi

and it would fail... i might do some more investigating :-)
It might only do it for episodes 1, will try to rename my episode 2 and see what happens..

OK.
Just tried and it failed to import Episode 2 if i had TRAILER in the filename...
But, then i looked at my other tv shows.
The Office
Has a episode with THE in it and it still adds... maybe the scraper or whatever ignores "THE".....



for now i have just changed "trailer" 2 "traile-r" and all works fine.
Reply
It's due to the word trailer. We ignore all trailers, after all.

This obviously needs a rethink with respect to tvshow scanning!

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
i could've sworn that we checked for "-trailer" not just the bareword. maybe thats only for the trailer matching.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
oh, understood.
Quite funny how i thought it was due to the tv show name but it would of been the same with any show..
Reply
it is separated but spaces are included. for anyone interested, the regexp is "[-\._ ]sample|trailer[-\._ ]"

in this case, the "space" "Trailer" "space" matches. You have a few renaming options...

- remove the preceeding "The" so the start of the filename is Trailer. this is probably the best option.
- combined Trailer + Park into TrailerPark but I dont know how well that will work
- use another character in between Trailer and Park thats not - . _ or space.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
This needs to either be configurable or re-thought. It seems like it's too general to me. Perhaps we can restrict to sample/trailer at the end of the filename? Even so, I'm sure there are valid movies or shows ending in "Trailer" or "Sample".

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
we only match trailers as "-trailer" for the purposes of tagging database items with local trailers. if we use that convention then the regexp should be something like this

(-trailer)|([ \.-_]sample[ \.-_])
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
Sounds good.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
shall i? i can bundle this into other changes i have for the scanner cpp file. its easy enough to change back later if necessary so that it doesnt need to be an atomic change by itself.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
and so this thread continues, unabated. But this time, I've read the FAQs, this entire thread, and many, many other pages.

I've installed xbmc on my PC running XP with all defaults.
My tv shows are in the format m:\tv\showname\season 01\01 - blah.avi
I have created a file called advancedsettings.xml in c:\Program Files\XBMC\userdata
The contents of that file are:
<advancedsettings>
<tvshowmatching>
<regexp>Season ([0-9]+)[\\/]([0-9]+) - [^\\/]*</regexp>
</tvshowmatching>
</advancedsettings>

I have deleted the MyVideos34 file and restarted xbmc and cleared the Video library and re-run the scan. I've done this so many times over the past week that I'm numb.

I have checked the syntax of the advancedsettings.xml file over 50 times.
I have checked that the file is in the location I specified above. The case is exactly as I have indicated. The contents are a cut and paste.

I have changed the regex to many different varieties, and checked each one using the website http://www.regexchecker.com. They always work.

And yet....
The xbmc log clearly shows that it is not even trying to use my regex. It appears to be ignoring my advancedsettings.xml file completely.

There are many, many MANY suggestions in this thread on the content of advancedsettings.xml, but almost none confirm where EXACTLY it's supposed to be. It >is< supposed to be in c:\program files\xbmc\userdata, right?

Is there anywhere within xbmc that you can tell it otherwise, or tell it to use/not use advancedsettings? Is there some debug mode that you can set to have it indicate that it is using advancedsettings.xml?

Here, as proof, is a small extract of my log:

11:40:26 T:788 M:441769984 DEBUG: running expression \[[Ss]([0-9]+)\]_\[[Ee]([0-9]+)\]?([^\\/]*)$ on label m:\tv\30 rock\season 01\1 - pilot.avi
11:40:26 T:788 M:441769984 DEBUG: running expression [\\/\._ \[-]([0-9]+)x([0-9]+)([^\\/]*)$ on label m:\tv\30 rock\season 01\1 - pilot.avi
11:40:26 T:788 M:441769984 DEBUG: running expression [Ss]([0-9]+)[\.-]?[Ee]([0-9]+)([^\\/]*)$ on label m:\tv\30 rock\season 01\1 - pilot.avi
11:40:26 T:788 M:441769984 DEBUG: running expression [\._ -]([0-9]+)([0-9][0-9])([\._ -][^\\/]*)$ on label m:\tv\30 rock\season 01\1 - pilot.avi
11:40:26 T:788 M:441769984 DEBUG: could not enumerate file M:\TV\30 Rock\Season 01\1 - Pilot.avi

I have gone, and shall remain,

temporarily insane.
Reply
  • 1
  • 10
  • 11
  • 12(current)
  • 13
  • 14
  • 17

Logout Mark Read Team Forum Stats Members Help
Regular Expressions1