Naming video files/TV shows: Difference between revisions
>Gamester17 |
>Gamester17 |
||
Line 46: | Line 46: | ||
:foo.103* | :foo.103* | ||
;Defaults for two- | ;Defaults for two-part TV Show Episode will match: | ||
:foo.s01e01-02 | :foo.s01e01-02 | ||
:foo_[s01]_[e01-02] | :foo_[s01]_[e01-02] |
Revision as of 13:58, 17 October 2008
Since build 8044, date: 2007-03-08, XBMC has had the ability to lookup and present information on TV Shows in the Video Library.
TV show support in XBMC
TV show support is through new scrapers and requires a connection to the internet.
The information gathered is stored locally in the Video Library so that it is available when you are offline. The scrapers scan your TV shows and retrieve the information about them from sites like TV.com and TheTVDB.com. |
TV show filenaming conventions
The TV show lookup relies on the following naming conventions in order to work as intended.
Directory Structure & File Names
Each TV show needs to be in its own folder for XBMC to be able to scan it into the library. The file names for TV shows have to be matched by the regular expressions set in tvshowmatching.
Directory layout example: TV Shows |----TV Show 1 | |___ Season # | |___ TV Show 1 Media files | |----TV Show 2 | |___ Season # | |___ TV Show 2 Media files | |----TV Show 3 | |___ Season # | |___ TV Show 3 Media files Where Content is Set on the top level "TV Shows" folder.
|
Multi-part Episodes
Handling of multi-part episodes (two part episodes in one file, multiple episodes in DVD images, etc.) is supported. The first matched tvshowmatching regexp and "[-EeXx]+([0-9]+)" will be repeatedly applied against a file name until no more seasons or episodes are found.
- This allows for file names such as
- foo_s01e01e02e03_s02e01e02
- foo104-05-06-201-02
- foo1x07x08x09
Multi-file Episodes
You can stack multiple files into one episode. For that to be available the Stack Duplicate TV Shows Video Library setting needs to be enabled. All the files must have the same season and episode number and they all have to be in the same folder. (This is to prevent unwanted stacking of true duplicates in different folders). The items will be automatically stacked in sequential order based off the filenames being sorted in a "natural" order (like this: -part1.avi, -part2.avi, ..., -part10.avi.)
TV Show Specials
Special episodes are currently supported with TheTVDB.com scraper. In order for the XBMC scraper regular expressions to recognize them, they should be part of season 0. (Specials naming order can be observed in the Specials Season of the relevant TV show at TheTVDB.com).
- Example
- Black Adder's Christmas Carol should have a file name that matches season 0 episode 2 (e.g. contain s00e02).
Troubleshooting TV Shows lookup
The scraper picks the wrong TV Show
Try adding the year within parentheses to the end of the TV Show folder-name, (this might be need for some TV Shows such as "Battlestar Galactica", "Doctor Who", "Jericho", and "Knight Rider" which has multiple entries on a TV meta data database because remakles of the original show). See the examples below:
\TV Shows\Battlestar Galactica (1978)\Season 1\Battlestar Galactica - S01E01.avi \TV Shows\Battlestar Galactica (2003)\Season 1\Battlestar Galactica - S01E01.avi \TV Shows\Doctor Who (1963)\Season 1\Doctor Who - S01E01.avi \TV Shows\Doctor Who (2005)\Season 1\Doctor Who - S01E01.avi \TV Shows\Jericho (1995)\Season 1\Jericho - S01E01.avi \TV Shows\Jericho (2006)\Season 1\Jericho - S01E01.avi \TV Shows\Knight Rider (1982)\Season 1\Knight Rider - S01E01.avi \TV Shows\Knight Rider (2008)\Season 1\Knight Rider - S01E01.avi
Note! "AVI" is just an example as the same applies to all video formats that XBMC support.
Custom Directory Structure & File Names
You can make your own naming conventions / rules by adding or editing regular expressions in the advancedsettings.xml file, with the tvshowmatching tag. When enumerating episodes for a series, XBMC only cares about the season and episode, so when designing regexps you should only be concerned with these things.
Here are several common naming schemes and corresponding regexps and examples.
\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> Example : \Battlestar Galactica\Season 3\01 - Occupation.avi (Season 3, Episode 1)
### ([season#][episode#] with nothing in between all in filename, assumes episode 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)
If you use leading 0's (for example, \Scrubs\01x01 - Pilot.avi instead of 1x1), and are having difficulty getting the TV Show scraper to work, try
##x## ([season#]x[episode#] all in filename : <xml> <tvshowmatching> <regexp>[0]*([0-9]+)x[0]*([0-9]+)[^\\/]*</regexp> </tvshowmatching> </xml> Example : \Scrubs\Season 1\01x01.Pilot.avi (Season 1, Episode 1) which simply strips leading 0's from the result.
s##e## (s[season#]e[episode#] at beginning of filename) <xml> <tvshowmatching> <regexp>[\\/]s([0-9]+)e([0-9]+)</regexp> </tvshowmatching> </xml> Example : videos\mytv-comedy\Scrubs\season 1\s01e01 - Pilot (hdtv.xvid).avi
Season ## - Episode ## (Season [season#] - Episode [episode#] in the beginning or middle of filename) <xml> <tvshowmatching> <regexp>Season ([0-9]+) - Episode ([0-9]+)[^\\/]*</regexp> </tvshowmatching> </xml> Example : TV Shows\Scrubs\Season 1\Scrubs - Season 1 - Episode 01 - Pilot.avi