Naming video files/TV shows: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Danomoseley
(Updated for v20)
(257 intermediate revisions by 35 users not shown)
Line 1: Line 1:
The TV show lookup relies on the following conventions in order to work as advertised.
{{VideoLibraryCreate}}
{{incomplete}}
{{mininav| [[Video library]] |[[HOW-TO:Create_Video_Library|Create Video Library]] }}
== Directory Structure & File Names ==
The directory structure and filenames for tvshows have to be matched by the regular expressions set in [[AdvancedSettings.xml#.3Ctvshowmatching.3E|tvshowmatching]].


The defaults will match the following structures/filenames:


== Custom Directory Structure & File Names ==
= Introduction =
The directory structure and filenames for tvshows have to be matched by the regular expressions set in [[AdvancedSettings.xml#.3Ctvshowmatching.3E|tvshowmatching]].
There are two components to TV Shows that need to be accurate for a successful scrape:
# Correct '''naming''' of the TV Show
# Correct '''numbering''' of the Episodes


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.
{{note|This page details the TV Show folder. Season folders and episodes are discussed in the following pages.}}


Here are several common naming schemes and corresponding regexps and examples.
= TV Show Folders =
{|
! scope="row" colspan="10"  style="width:300px; background-color:#; text-align:left;"|
! scope="row" ! |
|-
| style="background-color:#;"| [[File:Video-TVShow Folder.png|left|400px|Image 1- TV Show folders]] || style="background-color:#;"|
'''{{resize|1.3em|{{red|Each TV Show requires its own folder in the Source folder}} }}'''


'''\Season #\##''' (Season# is at very end of directory name, and filename starts with episode name, neither have to be a specific number of digits) :
The naming of your TV Show folder is '''critical''' to ensure the scrapers can correctly identify the TV Show and its episodes.


    <xml>
'''''TV Show Name (Year)''''' - This is the correct naming format for the TV Show folder
    <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)


* The TV Show folders are saved inside the '''''[[Source_folder|Source folder]]'''''
* Adding the (Year) makes scraping more accurate and differentiates between original and remake versions.
* For '''Country of Origin''' TV Shows, the (Year) is replaced with the country code. eg ''Hells Kitchen (UK), Hells Kitchen (US), Hells Kitchen (AU)'' etc.
* '''The title and (year) displayed at the scraper site is how you should name your show.'''
<br>
<br>
'''Note:''' If you are unsure of the name or year, then check which scraper you are using and visit the appropriate site for correct naming:
* '''''[https://www.themoviedb.org/ TheMovieDB]''''' - ''(the default scraper)''
* '''''[https://www.thetvdb.com/ TVDB]'''''
* '''''[https://www.tvmaze.com/ TV Maze]'''''
|-
! scope="row" colspan="10"  style="width:300px; background-color:#; text-align:left;"|
|}


'''###''' ([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 :
== Split folders ==
Split folders are TV Shows that have episodes split between two or more folders located in different Sources.<br>
This may occur when a long running show is progressively saved on one drive but, over time, the drive has been filled with other content, forcing you to save new episodes on another drive.


<xml>
To ensure these split TV Shows are correctly scraped as the same show, you '''must''' ensure that the TV Show folder names are identical. A slight variance could see a different show scraped for the second folder.
<tvshowmatching>
<regexp>([0-9]+)x([0-9]+)[^\\/]*</regexp>
</tvshowmatching>
</xml>


'''Example''' : \Scrubs\Season 1\1x01.Pilot.avi (Season 1, Episode 1)
If using NFO Files, copy the NFO file from one location into the other split folders.




* 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
<center>
{| style="border: 1px solid black;"
| scope="row" rowspan="2" style=" text-align:center;" | [[File:Mergefrom.gif|60px|link=Naming_video_files/Movies]]
| style="width:200px; text-align:center;" | '''Previous step'''
| style="width:200px; text-align:center;" | '''Next step'''
| scope="row" rowspan="2" style=" text-align:center;" | [[File:Merge-arrow.gif|60px|link=Naming_video_files/Seasons]]
|-
| style="width:200px; text-align:center;" | '''[[Naming_video_files/Movies|Movie Setup]]'''
| style="width:200px; text-align:center;" | '''[[Naming_video_files/Seasons|Seasons Setup]]'''
|}</center>




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


[[category:Scraper]]
{{top}}
{{updated|20}}
 
[[Category:Guides]]
[[Category:Karellen]]
[[Category:Video library]]
[[Category:First time user]]

Revision as of 04:01, 13 February 2023

Create Video Libraries
1. The Basics
2. Source Folder
3. Movie Setup
4a. TV Show Setup
4b. Seasons Setup
4c. Episodes Setup
5. Music Videos Setup
6. Add Source & Scrape
7. Scraping Problems
Home icon grey.png   ▶ Video library ▶ Create Video Library ▶ TV shows


Introduction

There are two components to TV Shows that need to be accurate for a successful scrape:

  1. Correct naming of the TV Show
  2. Correct numbering of the Episodes

Note: This page details the TV Show folder. Season folders and episodes are discussed in the following pages.

TV Show Folders

Image 1- TV Show folders

Each TV Show requires its own folder in the Source folder

The naming of your TV Show folder is critical to ensure the scrapers can correctly identify the TV Show and its episodes.

TV Show Name (Year) - This is the correct naming format for the TV Show folder

  • The TV Show folders are saved inside the Source folder
  • Adding the (Year) makes scraping more accurate and differentiates between original and remake versions.
  • For Country of Origin TV Shows, the (Year) is replaced with the country code. eg Hells Kitchen (UK), Hells Kitchen (US), Hells Kitchen (AU) etc.
  • The title and (year) displayed at the scraper site is how you should name your show.



Note: If you are unsure of the name or year, then check which scraper you are using and visit the appropriate site for correct naming:


Split folders

Split folders are TV Shows that have episodes split between two or more folders located in different Sources.
This may occur when a long running show is progressively saved on one drive but, over time, the drive has been filled with other content, forcing you to save new episodes on another drive.

To ensure these split TV Shows are correctly scraped as the same show, you must ensure that the TV Show folder names are identical. A slight variance could see a different show scraped for the second folder.

If using NFO Files, copy the NFO file from one location into the other split folders.



Mergefrom.gif Previous step Next step Merge-arrow.gif
Movie Setup Seasons Setup


Return to top