Naming video files/TV shows: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Danomoseley
>Danomoseley
Line 9: Line 9:
The directory structure and filenames for tvshows have to be matched by the regular expressions set in [[AdvancedSettings.xml#.3Ctvshowmatching.3E|tvshowmatching]].  
The directory structure and filenames for tvshows have to be matched by the regular expressions set in [[AdvancedSettings.xml#.3Ctvshowmatching.3E|tvshowmatching]].  


'''\Battlestar Galactica\Season 3\01 - Occupation.avi''' will be matched by
'''\Season #\## (Season# is at very end of directory name, and filename starts with episode name, neither have to be a specific number of digits)''' :


<xml>
<xml>
Line 17: Line 17:
</xml>
</xml>
* works in BUILD SVN 8339 and greater *
* works in BUILD SVN 8339 and greater *
'''Example''' : \Battlestar Galactica\Season 3\01 - Occupation.avi (Season 3, Episode 1)


'''### - Episode Title.extension''' :
<xml>
<regexp>([0-9]+)+([0-9][0-9]) - .*\.[a-zA-z0-9]+[^\\/]</regexp>
</xml>
'''Example''': \24\Season 6\601 - 6:00am to 7:00am.avi would trigger a match. (Season 6, Episode 1)
'''Example 2''': \24\601 - 6:00am to 7:00am.avi would also match (Season 6, Episode 1)
'''\Lost\Season 1\Lost - 101.avi''' will be matched by


'''### ([season#][episode#] with nothing in between all in filename, assumes season number is always 2 digits) :
<xml>
<xml>
<tvshowmatching>
<tvshowmatching>
<regexp>([0-9]+)([0-9][0-9])[^\\/]*</regexp>
    <regexp>([0-9]+)([0-9][0-9])[^\\/]*</regexp>
</tvshowmatching>
</tvshowmatching>
</xml>
</xml>


'''\Lost\Season 1\01x01.pilot.avi''' will be matched by
'''Example''' : \24\Season 6\601 - 6:00am to 7:00am.avi (Season 6, Episode 1)
'''Example 2''' : \Lost\Season 1\Lost - 101.avi (Season 1, Episode 1)
'''Example 3''' : \24\601 - 6:00am to 7:00am.avi (Season 6, Episode 1)
 
'''##x## ([season#]x[episode#] all in filename''' :


<xml>
<xml>
Line 42: Line 38:
</tvshowmatching>
</tvshowmatching>
</xml>
</xml>
'''Example''' : \Scrubs\Season 1\1x01.Pilot.avi (Season 1, Episode 1)





Revision as of 02:13, 30 March 2007

The TV show lookup relies on the following conventions in order to work as advertised.

Incomplete.png INCOMPLETE:
This page or section is incomplete. Please add information or correct uncertain data which is marked with a ?

Directory Structure & File Names

The directory structure and filenames for tvshows have to be matched by the regular expressions set in tvshowmatching.

The defaults will match the following structures/filenames:

Custom Directory Structure & File Names

The directory structure and filenames for tvshows have to be matched by the regular expressions set in tvshowmatching.

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

<xml> <tvshowmatching>

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

</tvshowmatching> </xml>

  • works in BUILD SVN 8339 and greater *

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


### ([season#][episode#] with nothing in between all in filename, assumes season number is always 2 digits) : <xml> <tvshowmatching>

   <regexp>([0-9]+)([0-9][0-9])[^\\/]*</regexp>

</tvshowmatching> </xml>

Example : \24\Season 6\601 - 6:00am to 7:00am.avi (Season 6, Episode 1) Example 2 : \Lost\Season 1\Lost - 101.avi (Season 1, Episode 1) Example 3 : \24\601 - 6:00am to 7:00am.avi (Season 6, Episode 1)

##x## ([season#]x[episode#] all in filename :

<xml> <tvshowmatching> <regexp>([0-9]+)x([0-9]+)[^\\/]*</regexp> </tvshowmatching> </xml>

Example : \Scrubs\Season 1\1x01.Pilot.avi (Season 1, Episode 1)


  • Tested with SVN dated March 25th 2007.

See Also

http://www.xboxmediacenter.com/forum/showthread.php?t=25349

http://en.wikipedia.org/wiki/Regular_expressions


Regular Expression Testing: http://www.regextester.com/