Kodi Community Forum
Multiple Episode TV Show Naming - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: Multiple Episode TV Show Naming (/showthread.php?tid=52321)



Multiple Episode TV Show Naming - Harry Muscle - 2009-06-06

I'm using a custom TV Show naming convention, taken from the online manual. Here's a snippet of what I'm using:

***

\Season #\## (Season# is at very end of directory name, and filename starts with episode name, neither have to be a specific number of digits) :

<tvshowmatching>
<regexp>Season[\._ ]([0-9]+)[\\/]([0-9]+)[^\\/]*</regexp>
</tvshowmatching>

Example : \Battlestar Galactica\Season 3\01 - Occupation.avi (Season 3, Episode 1)

***

However, I'm trying to figure out how I should name a file that has two episodes in it. I've tried:

21 - 22 - Name of Episodes.avi

But that only scanned episode 21. Then I tried

21 22 - Name of Episodes.avi

But that scanned episode 21 twice. Any ideas what I should be calling it to have the scraper scan episode 21 and 22 from that file?

Any help is much appreaciated.

Thanks,
Harry


- jmarshall - 2009-06-06

Code:
<tvshowmatching>
  <regexp>Season[\._ ]([0-9]+)[\\/]([0-9]+)([^\\/]*)</regexp>
</tvshowmatching>

The 3rd () is the piece it runs the two part regexp matching on. You'll need a suitable two part regexp as well - something like <regexp>- ([0-9])+</regexp> should do it (obviously formatted up as the two-parter stuff needs to be done.)

Cheers,
Jonathan


- Harry Muscle - 2009-06-06

I'm pretty tech savvy, but these regular expressions are confusing as heck Smile

OK, just to clarify ...

are you saying I should add a second <regexp> line to my <tvshowmatching> section?

For example:

<tvshowmatching>
<regexp>Season[\._ ]([0-9]+)[\\/]([0-9]+)([^\\/]*)</regexp>
<regexp>- ([0-9])+</regexp>
</tvshowmatching>

or are you saying I should add the <regexp>- ([0-9])+</regexp> section into my existing <regexp> section, like:

<tvshowmatching>
<regexp>Season[\._ ]([0-9]+)[\\/]([0-9]+) - ([0-9]+)[^\\/]*</regexp>
</tvshowmatching>

Sorry to be a bother, just trying to wrap my head around this one Smile

Thanks for the help,
Harry

P.S. If it's not too much bother if you could let me know exactly what that line should read if I wanna be able to name my file: "21 - 22 - Name of Episodes.avi" that would be much appreciated. Thanks again.


- jmarshall - 2009-06-06

By the looks of it, the twoparter matching isn't configurable. Thus, you need to ensure it matches the default regexp:

http://wiki.xbmc.org/?title=TV_Shows#Multi-part_Episodes

Naming your files "20-21-22 foo.avi" will be fine. i.e. no spaces.

Then just use your normal regexp with the extra () around the last term and you'll be all good. The third () block is the one that we run the twoparter regexp on.

Cheers,
Jonathan