Regular Expressions - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: XBMC General Help and Support (/forumdisplay.php?fid=111)
+--- Thread: Regular Expressions (/showthread.php?tid=25349)
- matthuisman - 2008-08-28 10:21
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:
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..
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.
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.
- jmarshall - 2008-08-28 11:15
It's due to the word trailer. We ignore all trailers, after all.
This obviously needs a rethink with respect to tvshow scanning!
- kraqh3d - 2008-08-28 14:53
i could've sworn that we checked for "-trailer" not just the bareword. maybe thats only for the trailer matching.
- matthuisman - 2008-08-28 23:56
Quite funny how i thought it was due to the tv show name but it would of been the same with any show..
- kraqh3d - 2008-08-29 16:10
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.
- jmarshall - 2008-08-29 23:09
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".
- kraqh3d - 2008-09-02 17:06
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[ \.-_])
- jmarshall - 2008-09-02 22:32
- kraqh3d - 2008-09-02 22:42
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.
- douginoz - 2008-09-29 03:57
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:
<regexp>Season ([0-9]+)[\\/]([0-9]+) - [^\\/]*</regexp>
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.
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,