Kodi Community Forum

Full Version: Scraping season/episode numbers from folder names
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey everyone,

I was wondering if there's a way to make XBMC scrape the season and episode numbers from folder names rather than file names.
For example, I have something like this:

Code:
TV\Someshow\S05\E03\somefile.mkv

And I want XBMC to recognize it as Someshow.S05E03.
One thing that's important is that it must ignore the file name, because some of the files have the wrong numbers in their names, and unfortunately I can't change the file names, only the directories. Also some directories have .nfo's in them that should be ignored as well.
Is there a way to go about doing this? I'm using XBMC Frodo on Windows 8.1. I don't mind installing additional add-ons.

Thanks!

If it makes things easier, I don't mind changing the paths to something like:

Code:
TV\Someshow.S05E03\somefile.mkv

But I prefer to keep the hierarchy as it is.
of course. the regressions are fed the full path. just add re's to your likings.
Awesome, where can I configure this?
Is there also a way to make the scraper ignore the last directory? Something like this:
Code:
TV\Someshow\S05\E03\Somefolder\somefile.mkv
Where 'Somefolder' might have the wrong numbers as well.
Guys, please give me a hand here. I understand that I need to add a regex to advancedsettings.xml, but I have no idea what to add.

For example let's say I have:
Code:
TV\Dexter\S05\E03\Dexter.S01E99\dexter.s80e11.mkv
And 'TV' is my base source. I want this file to be registered as S05E03, and not anything else! What's the expression I need here? And will it ensure that it won't be registered more than once as different episodes?
Thanks for your help